lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a81d5fbc-e66a-4de0-a015-e9a6b73c2ed8@stanley.mountain>
Date: Wed, 30 Oct 2024 10:43:19 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Zhihao Cheng <chengzhihao1@...wei.com>
Cc: Colin Ian King <colin.i.king@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Richard Weinberger <richard@....at>, linux-mtd@...ts.infradead.org,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] jffs2: remove redundant check on outpos > pos

On Wed, Oct 30, 2024 at 12:45:42PM +0800, Zhihao Cheng wrote:
> 在 2024/10/30 6:20, Colin Ian King 写道:
> > The check for outpos > pos is always false because outpos is zero
> > and pos is at least zero; outpos can never be greater than pos.
> > The check is redundant and can be removed.
> > 
> > Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> > ---
> >   fs/jffs2/compr_rubin.c | 5 -----
> >   1 file changed, 5 deletions(-)
> > 
> > diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
> > index 556de100ebd5..9854253d0108 100644
> > --- a/fs/jffs2/compr_rubin.c
> > +++ b/fs/jffs2/compr_rubin.c
> > @@ -276,11 +276,6 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in,
> >   	end_rubin(&rs);
> 
> Maybe this check could detect the overflow of 'pos', I guess.

"pos" is a number between 0 and 4.  It can't overflow.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ