OSDN Git Service

fs/ntfs3: Harden against integer overflows
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 12 Sep 2022 15:08:51 +0000 (18:08 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 30 Sep 2022 14:39:53 +0000 (17:39 +0300)
commite001e60869390686809663c02bceb1d3922548fb
tree1ef930f43eec97563640de49eab2a2a94dba6b56
parent4f1dc7d9756e66f3f876839ea174df2e656b7f79
fs/ntfs3: Harden against integer overflows

Smatch complains that the "add_bytes" is not to be trusted.  Use
size_add() to prevent an integer overflow.

Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/xattr.c