From: Andrew Morton <akpm@osdl.org>
To: Eric Sesterhenn <snakebyte@gmx.de>
Cc: linux-kernel@vger.kernel.org, matthew@wil.cx
Subject: Re: [Patch] Uninitialized variable in drivers/scsi/ncr53c8xx.c
Date: Thu, 31 Aug 2006 23:00:49 -0700 [thread overview]
Message-ID: <20060831230049.db26d0e6.akpm@osdl.org> (raw)
In-Reply-To: <1157066952.13948.3.camel@alice>
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'.
> --- linux-2.6.18-rc5/drivers/scsi/ncr53c8xx.c.orig 2006-09-01 01:25:09.000000000 +0200
> +++ linux-2.6.18-rc5/drivers/scsi/ncr53c8xx.c 2006-09-01 01:25:26.000000000 +0200
> @@ -692,7 +692,7 @@ static int __init sym53c8xx__setup(char
> int xi = 0;
>
> while (cur != NULL && (pc = strchr(cur, ':')) != NULL) {
> - char *pe;
> + char *pe = NULL;
>
> val = 0;
> pv = pc;
>
next prev parent reply other threads:[~2006-09-01 6:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 23:29 Eric Sesterhenn
2006-09-01 6:00 ` Andrew Morton [this message]
2006-09-01 15:45 ` Eric Sesterhenn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060831230049.db26d0e6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=snakebyte@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome