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

Re: [PATCH] Fix crash in t0020 (crlf conversion)

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 22, 2007, 22:52 UTC
Message-ID
<20070422225247.GA2409@steel.home>
In-Reply-To
<20070422141222.GC2431@steel.home>
Alex Riesen, Sun, Apr 22, 2007 16:11:54 +0200:
> Reallocated wrong size.
> Noticed on Ubuntu 7.04 probably because it has some malloc diagnostics in libc:
> "git-read-tree --reset -u HEAD" aborted in the test. Valgrind sped up the
> debugging greatly: took me 10 minutes.
Alex Riesen, Sun, Apr 22, 2007 16:12:22 +0200:
> Also, noticed by valgrind: the code caused a read out-of-bounds.
> Some comments updated as well (they still reflected old calling
> conventions).

Actually, it is all the other way around. The _second_ patch (buffer->src in convert.c, the read out-of-bounds caused overwrite of malloc control structures because of incorrect dst update condition) is for the crash, the first is unrelated, but noticed by valgrind in the same test.

I messed up the commit descriptions completely (Martins mail made me look at the patches again). Sorry

Previous: Alex Riesen
Message 2 of 2 in “Fix a typo in crlf conversion code”
  1. Fix a typo in crlf conversion codeAlex Riesen, Apr 22, 2007
  2. Alex RiesenApr 22, 2007

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.