Jingbo Xu
0955b8eac3
erofs: fix potential overflow calculating xattr_isize
[ Upstream commit 1b3567a1969b26f709d82a874498c0754ea841c3 ]
Given on-disk i_xattr_icount is 16 bits and xattr_isize is calculated
from i_xattr_icount multiplying 4, xattr_isize has a theoretical maximum
of 256K (64K * 4).
Thus declare xattr_isize as unsigned int to avoid the potential overflow.
Fixes: bfb8674dc044 ("staging: erofs: add erofs in-memory stuffs")
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20230414061810.6479-1-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:07 +09:00
..
2022-07-22 21:44:27 +08:00
2022-07-22 21:46:03 +08:00
2023-03-17 08:50:14 +01:00
2022-09-23 10:55:56 +08:00
2022-07-31 22:26:29 +08:00
2022-09-26 23:55:43 +08:00
2023-03-10 09:32:46 +01:00
2022-09-27 17:27:45 +08:00
2023-05-11 23:03:07 +09:00
2022-05-18 00:11:19 +08:00
2022-05-18 00:11:19 +08:00
2022-09-27 17:27:45 +08:00
2021-10-25 08:22:59 +08:00
2023-05-11 23:03:07 +09:00
2022-11-10 09:53:20 +08:00
2021-06-08 00:41:24 +08:00
2022-07-03 18:08:40 -07:00
2022-01-04 23:47:08 +08:00
2022-09-27 17:27:25 +08:00
2023-03-17 08:50:28 +01:00
2022-10-17 06:55:49 +08:00
2023-05-11 23:03:06 +09:00