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

Re: [PATCH 1/2] http-backend: Fix access beyond end of string.

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Nov 23, 2009, 17:20 UTC
Message-ID
<9201C178-AABF-4320-B7B0-FEE841300E69@gernhardtsoftware.com>
In-Reply-To
<7viqdb0zhs.fsf@alter.siamese.dyndns.org>
On Nov 16, 2009, at 1:12 AM, Junio C Hamano wrote:
Show 5 quoted lines
> 	n = out[0].rm_eo - out[0].rm_so; /* allocation */
>        ... validate and fail invalid method ...
>        cmd_arg = xmalloc(n);
>        memcpy(cmd_arg, dir + out[0].rm_so + 1, n-1);
>        cmd_arg[n-1] = '\0';
I just thought I'd point out that this change (committed as 48aec1b) fixed the problem I was having with t5541-http-push (and a couple others) hanging.  Looks like that one extra byte was overwriting something that malloc/free wanted to keep intact on OS X.
~~ Brian
Previous: Tarmigan
Message 8 of 8 in “http-backend: Fix access beyond end of string.”
  1. 1/2 http-backend: Fix access beyond end of string.Tarmigan Casebolt, Nov 14, 2009
  2. 2/2 http-backend: Let gcc check the format of more printf-type functions.Tarmigan Casebolt, Nov 14, 2009
  3. Shawn O. PearceNov 16, 2009
  4. Shawn O. PearceNov 16, 2009
  5. Jeff KingNov 16, 2009
  6. Junio C HamanoNov 16, 2009
  7. TarmiganNov 17, 2009
  8. Brian GernhardtNov 23, 2009

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.