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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFo99ga_G=Bsvagi5PFCiq++6CaAqtWUo5PS6VxLUEsTvEMqdA@mail.gmail.com>
Date:	Fri, 23 May 2014 18:40:17 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Jesper Nilsson <jesper.nilsson@...s.com>
Cc:	Mikael Starvik <starvik@...s.com>,
	Jesper Nilsson <jespern@...s.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-cris-kernel <linux-cris-kernel@...s.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch: cris: arch-v32: drivers: axisflashmap.c: Cleaning
 up inconsistent NULL checks

Hej Jesper!

But in several other place in the feature ensures that main_mtd is not NULL.
(That's what cppcheck base their misjudgment on too)

Then all these checks are unnecessary?
You should know, looks like you've written most of the code in 2007 :)


Best regards
Rickard Strandqvist


2014-05-23 9:00 GMT+02:00 Jesper Nilsson <jesper.nilsson@...s.com>:
> On Fri, May 23, 2014 at 12:00:09AM +0200, Rickard Strandqvist wrote:
>> Cleaning up inconsistent NULL checks.
>> There is otherwise a risk of a possible null pointer dereference.
>>
>> Was largely found by using a static code analysis program called cppcheck.
>
> ... and is a false positive.
>
> We can't enter this if-block unless ptable_head is set,
> which is only set if main_mtd is set.
>
> It might be useful to add it anyways, but there's a refactoring
> needed for the axisflashmaps, so I'll keep it for then.
>
> /^JN - Jesper Nilsson
> --
>                Jesper Nilsson -- jesper.nilsson@...s.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ