Thread (4 messages) flat view 4 messages, 2 authors, 2018-02-20

Re: [PATCH v1 1/1] drivers: isdn: NULL pointer dereference [null-pointer-deref] (CWE 476) problem

From: David Miller <davem@davemloft.net>
Date: 2018-02-16 21:11:15

From: Joe Moriarty <redacted>
Date: Thu, 15 Feb 2018 15:27:00 -0500
The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer dereference problem.

- drivers/isdn/mISDN/core.c
function channelmap_show() does not check the returned mdev
variable from dev_to_mISDN() for NULL.  Added the check for
NULL, which results in a value of 0 being returned.

Signed-off-by: Joe Moriarty <redacted>
Reviewed-by: Jonathan Helman <redacted>
Since the lifetime for the sysfs files for these devices is strictly
smaller than the lifetime of the 'dev' object and it's driver data,
it is not possible for mdev to be NULL in this situation.

I understand what the static checker is trying to do, but within
context this lack of a NULL check is legitimate.

I'm not applying this, sorry.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help