Re: [net-wireless-orinoco] question about potential null pointer dereference

From: Johannes Berg
Date: Tue May 30 2017 - 15:37:11 EST


Hi,

> The issue here is that line 56 implies that pointer tfm_michael
> mightÂbe NULL. If this is the case, there is a potential NULL
> pointerÂdereference at line 52 once pointer tfm_michael is
> indirectlyÂdereferenced inside macro SHASH_DESC_ON_STACK().
>
> My question is if there is any chance that pointer tfm_michael
> mightÂbe NULL when calling macro SHASH_DESC_ON_STACK() ?
>
> I'm trying to figure out if this is a false positive or something
> thatÂneeds to be fixed somehow.

Look, if you're just sending the coverity reports to the list without
reflecting and researching them, that's not actually useful - we can
look at them ourselves.

It took me at most a few minutes to figure this one out, so please just
do the same, look at the code, and figure out what the right answer is
here.

johannes