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

Re: git-status segmentation fault in master / OS X

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 20, 2010, 12:58 UTC
Message-ID
<fcaeb9bf1001200458v436a8adeq5cfc6753900e6c0c@mail.gmail.com>
In-Reply-To
<57518fd11001200243v416aa5f9o37a3b5b92bef3b57@mail.gmail.com>
On 1/20/10, Jonathan del Strother <maillist@steelskies.com> wrote:
>  One thing I wondered about from that commit - shouldn't the "buf =
>  xmalloc(size);" on dir.c:252 be "buf = xmalloc(size+1);" ?  I haven't
>  really looked at the program flow there, so may be wrong...

You would also need to revert 66c3fa0 (Avoid writing to buffer in add_excludes_from_file_1() - 2009-08-20) and see if it fixes the problem. I think there is a potential memory corruption at "buf[i - (i && buf[i-1] == '\r')] = 0;". Don't know if it is the cause though.

-- 
Duy
Previous: Jonathan del StrotherNext: Nguyễn Thái Ngọc Duy
Message 5 of 10 in “git-status segmentation fault in master / OS X”
  1. Jonathan del StrotherJan 19, 2010
  2. Jeff KingJan 20, 2010
  3. Junio C HamanoJan 20, 2010
  4. Jonathan del StrotherJan 20, 2010
  5. Nguyen Thai Ngoc DuyJan 20, 2010
  6. Fix memory corruption when .gitignore does not end by \nNguyễn Thái Ngọc Duy, Jan 20, 2010
  7. Junio C HamanoJan 20, 2010
  8. Nguyen Thai Ngoc DuyJan 21, 2010
  9. Jonathan del StrotherJan 21, 2010
  10. Junio C HamanoJan 21, 2010

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.