projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fs/ntfs3: Harden against integer overflows
[platform/kernel/linux-starfive.git]
/
fs
/
ntfs3
/
xattr.c
diff --git
a/fs/ntfs3/xattr.c
b/fs/ntfs3/xattr.c
index
7de8718
..
ea582b4
100644
(file)
--- a/
fs/ntfs3/xattr.c
+++ b/
fs/ntfs3/xattr.c
@@
-107,7
+107,7
@@
static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea,
return -EFBIG;
/* Allocate memory for packed Ea. */
- ea_p = kmalloc(size
+ add_bytes
, GFP_NOFS);
+ ea_p = kmalloc(size
_add(size, add_bytes)
, GFP_NOFS);
if (!ea_p)
return -ENOMEM;