diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-10-09 17:23:16 (GMT) |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-11-13 16:55:39 (GMT) |
commit | ef4af94edcf8fc32ab1d4141537a4eb29ff45a40 (patch) | |
tree | 0c7594ab2e585106570c8e018c960c0c747799de /fs/orangefs/dir.c | |
parent | 5714156be232b088e24c74fe4e95cb900a8b12e0 (diff) | |
download | linux-ef4af94edcf8fc32ab1d4141537a4eb29ff45a40.tar.xz |
orangefs: switch decode_dirents() to use of kcalloc()
gets rid of multiplication overflow
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/dir.c')
-rw-r--r-- | fs/orangefs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index daf4973..280755d 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -27,7 +27,7 @@ static long decode_dirents(char *ptr, struct pvfs2_readdir_response_s *readdir) readdir->token = rd->token; readdir->pvfs_dirent_outcount = rd->pvfs_dirent_outcount; - readdir->dirent_array = kmalloc(readdir->pvfs_dirent_outcount * + readdir->dirent_array = kcalloc(readdir->pvfs_dirent_outcount, sizeof(*readdir->dirent_array), GFP_KERNEL); if (readdir->dirent_array == NULL) |