Home
last modified time | relevance | path

Searched hist:"1 b3567a1" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/erofs/
H A Dinternal.h1b3567a1 Fri Apr 14 01:18:10 CDT 2023 Jingbo Xu <jefflexu@linux.alibaba.com> 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>