git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Off-by-one error in get_path_prefix(), found by Valgrind

From
PRPavel Roskin <proski@gnu.org>
Date
Jun 7, 2006, 18:33 UTC
Message-ID
<1149705204.11931.3.camel@dv>
In-Reply-To
<20060607180543.GA26638@lsrfire.ath.cx>
On Wed, 2006-06-07 at 20:05 +0200, Rene Scharfe wrote:
> Argh, yes.  Thanks, Pavel!
Actually, thanks to Julian Seward for Valgrind.
>   However, the other branch is incorrect, too:
> accessing path->buf[path->len] is wrong, even if it's within the buffer.
> In order to use a length variable to point to the end of some string we
> need to subtract 1. *sigh*  So, how about this one instead?
Fine with me.  Thank you for noticing!
-- 
Regards,
Pavel Roskin
Previous: Rene ScharfeNext: Junio C Hamano
Message 3 of 4 in “Off-by-one error in get_path_prefix(), found by Valgrind”
  1. Off-by-one error in get_path_prefix(), found by ValgrindPavel Roskin, Jun 7, 2006
  2. Rene ScharfeJun 7, 2006
  3. Pavel RoskinJun 7, 2006
  4. Junio C HamanoJun 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.