lkml.org 
[lkml]   [2006]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch] Uninitialized variable in drivers/scsi/ncr53c8xx.c
From
Date
On Thu, 2006-08-31 at 23:00 -0700, Andrew Morton wrote:
> On Fri, 01 Sep 2006 01:29:12 +0200
> Eric Sesterhenn <snakebyte@gmx.de> wrote:
>
> > hi,
> >
> > this was spotted by coverity (id #880).
> > We use simple_strtoul() earlier to initialize pe,
> > if the function fails, it also does not initialize it.
> > Therefore we should initialize it ourselves, so the check
> > in the OPT_TAGS case "if (pe && *pe == '/')" makes sense, and
> > actually makes the command line parsing more robust.
> >
> > Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
>
> simple_strtoul() always initialises `pe'.

D'oh. But i think we should apply the patch nevertheless,
to make the parsing code more robust, in case the command line is
screwed up (and simple_strtoul() is never called).

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-01 17:49    [W:1.798 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site