mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
fs/squashfs/file_direct.c: replace count*size kmalloc by kmalloc_array
kmalloc_array() manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Phillip Lougher <phillip@squashfs.org.uk> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e04aca4a76
commit
14694888db
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize)
|
|||
|
||||
pages = end_index - start_index + 1;
|
||||
|
||||
page = kmalloc(sizeof(void *) * pages, GFP_KERNEL);
|
||||
page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL);
|
||||
if (page == NULL)
|
||||
return res;
|
||||
|
||||
|
|
Loading…
Reference in a new issue