linux-mips
[Top] [All Lists]

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

To: Thomas Jarosch <thomas.jarosch@intra2net.com>
Subject: Re: [PATCH] Fix off-by-two in arcs_cmdline buffer size check
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 2 Nov 2011 13:21:24 +0000
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
In-reply-to: <4EAC0394.5000807@intra2net.com>
References: <4EAC0394.5000807@intra2net.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] Fix off-by-two in arcs_cmdline buffer size check, Ralf Baechle <=