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

From: Wolfram Sang
Date: Thu Jan 13 2011 - 17:46:40 EST


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.

Kind regards,

Wolfram

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Attachment: signature.asc
Description: Digital signature