Re: [PATCH] Fix off-by-two in arcs_cmdline buffer size check

From: Ralf Baechle
Date: Wed Nov 02 2011 - 09:21:32 EST


On Sat, Oct 29, 2011 at 03:45:56PM +0200, Thomas Jarosch wrote:

> Cause is a misplaced bracket.
>
> The code
>
> strlen(buf+1)
>
> will be two bytes less than
>
> strlen(buf)+1
>
> The +1 is in this code to reserve space for an additional space character.

Thanks, applied.

The same buggy code just formatted slightly differently also exists in
Emma. I added the Emma fix to the patch and applied it.

Thanks!

Ralf
--
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/