From: Hongzhen Luo Date: Mon, 5 Aug 2024 03:25:10 +0000 (+0800) Subject: erofs-utils: lib: fix potential overflow issue X-Git-Tag: v1.8~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa77424c210585df36b8b0e820ff3f0fd0a4ddd4;p=platform%2Fupstream%2Ferofs-utils.git erofs-utils: lib: fix potential overflow issue Coverity-id: 502377 Signed-off-by: Hongzhen Luo Reviewed-by: Sandeep Dhavale Link: https://lore.kernel.org/r/20240805032510.2637488-1-hongzhen@linux.alibaba.com Signed-off-by: Gao Xiang --- diff --git a/lib/kite_deflate.c b/lib/kite_deflate.c index a5ebd66..e52e382 100644 --- a/lib/kite_deflate.c +++ b/lib/kite_deflate.c @@ -817,7 +817,8 @@ static const struct kite_matchfinder_cfg { /* 9 */ {32, 258, 258, 4096, true}, /* maximum compression */ }; -static int kite_mf_init(struct kite_matchfinder *mf, int wsiz, int level) +static int kite_mf_init(struct kite_matchfinder *mf, unsigned int wsiz, + int level) { const struct kite_matchfinder_cfg *cfg;