[lkml]   [2007]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][isapnp] Fix a potential NULL pointer dereference in isapnp_read_tag()
On 03/07/07, Andrew Morton <> wrote:
> On Sun, 1 Jul 2007 01:38:31 +0200
> Jesper Juhl <> wrote:
> > The Coverity checker spotted (as bug #809) that we dereference 'type'
> > long before we actually test it against NULL in
> > drivers/pnp/isapnp/core.c::isapnp_read_tag() - both branches of the
> > 'if (tag & 0x80)' dereference type, and since this 'if' is before the test
> > against NULL and the return of -1, this will blow up is ever type is NULL.
> > This is easy to fix by simply moving the NULL test to the beginning of
> > the function.
> >
> dood, look at the callers. NULL is not possible here.
You are right, there's absolutely no way that we could get a NULL
pointer there - that was sloppy of me :-(

I guess we should just get rid of the check completely. I'll cook up
a patch for that tomorrow.

Jesper Juhl <>
Don't top-post
Plain text mails only, please
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-04 03:07    [W:0.032 / U:10.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site