Re: [PATCH] strncpy() will not \0 terminate result

From: Jesper Juhl
Date: Thu Jan 13 2011 - 17:48:45 EST


On Thu, 13 Jan 2011, Wolfram Sang wrote:

> On Thu, Jan 13, 2011 at 11:35:39PM +0100, Jesper Juhl wrote:
> > Hi,
> >
> > Mpass() in scripts/unifdef.c has this code:
> > strncpy(keyword, "if ", 4);
> > this will fail to \0 terminate the destination.
> > Following patch should fix that up.
> >
> > Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
>
> Thanks for fixing those issues. If you could spend a few more seconds on the
> subject line (missing sth like "scripts/unifdef"-prefix; I initially was
> fearing the bug was in lib/string.c) and the commit-message (which reads like a
> mail), that would be helpful for reviewers.
>
Yeah, I don't know what happened when I wrote that subject - it's quite
bad. Sorry.

--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

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