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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 25 Jan 2017 09:31:40 +0100
From:   Richard Weinberger <richard@....at>
To:     David Binderman <dcb314@...mail.com>,
        Richard Weinberger <richard.weinberger@...il.com>
Cc:     "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: fs/jffs2/readinode.c:189: faulty logic ?

David,

Am 24.01.2017 um 23:57 schrieb David Binderman:
>>> fs/jffs2/readinode.c:189]: (style) Condition 'tn.fn.ofs>=offset' is always true
> 
>>What tool produces this info?
> 
> A static analyser for C and C++ called cppcheck, available from sourceforge.

That needs to go into the changelog.

>>That code is odd, yes. But we need more info.
>>Why is fn.fn.ofs>=offset always true?
> 
> Doh. By obvious inspection of the code.
> If test x < y fails, then x must be >= y.

So tn.fn.ofs>=offset is _not_ always true.
The else branch is always false.

Thanks,
//richard

Powered by blists - more mailing lists