diff options
author | Jingbo Xu <jefflexu@linux.alibaba.com> | 2023-04-14 09:18:10 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-04-16 20:15:54 +0300 |
commit | 1b3567a1969b26f709d82a874498c0754ea841c3 (patch) | |
tree | db06f33e0421125b0aa08966f83b52dcf679faaf /fs/erofs/inode.c | |
parent | 4fdadd5b0f0c723c812842454f8cca1619f2e731 (diff) | |
download | linux-1b3567a1969b26f709d82a874498c0754ea841c3.tar.xz |
erofs: fix potential overflow calculating xattr_isize
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>
Diffstat (limited to 'fs/erofs/inode.c')
0 files changed, 0 insertions, 0 deletions