[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200912151544.04714.rusty@rustcorp.com.au>
Date: Tue, 15 Dec 2009 15:44:04 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: "Segher Boessenkool" <segher@...nel.crashing.org>
Cc: "Michal Marek" <mmarek@...e.cz>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] modpost: fix segfault with short symbol names
On Tue, 15 Dec 2009 12:03:12 am Segher Boessenkool wrote:
> > On Sat, Dec 12, 2009 at 04:26:20PM +0100, Segher Boessenkool wrote:
> >> >- if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
> >> >+ if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
> >>
> >> This doesn't change anything. In both cases the function will return 0
> >> only if all strlen(CRC_PFX) chars match, and in both cases it can access
> >> strlen(CRC_PFX) chars (strncmp() is allowed to access characters after
> >> the first \0 just fine).
> >
> > str(n)cmp is not allowed to access characters past the NUL byte.
>
> Let me apologise for the confusion.
Mea culpas must be short, to avoid wasting even more time. And they must be
at least as absolute as the incorrect assertion was. This helps us lurkers
and archive readers flush the crap from their brains.
Your mails used _ for emphasis and "You are wrong.". Ouch. I suggest:
"I am *wrong*. Sorry Michal for the brain fart."
Also, please stop channeling Richard B. Johnson.
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists