Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-17504 build: fix gcc-13 [-Werror=stringop-overread] error
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
hash.c
diff --git
a/libcfs/libcfs/hash.c
b/libcfs/libcfs/hash.c
index
34da19d
..
b69f638
100644
(file)
--- a/
libcfs/libcfs/hash.c
+++ b/
libcfs/libcfs/hash.c
@@
-1064,7
+1064,7
@@
cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
len = (flags & CFS_HASH_BIGNAME) == 0 ?
CFS_HASH_NAME_LEN : CFS_HASH_BIGNAME_LEN;
- LIBCFS_ALLOC(hs,
offsetof(struct cfs_hash, hs_name[len])
);
+ LIBCFS_ALLOC(hs,
sizeof(struct cfs_hash) + len
);
if (hs == NULL)
RETURN(NULL);