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

Re: [PATCH] fsck: properly bound "invalid tag name" error message

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 8, 2014, 11:35 UTC
Message-ID
<alpine.DEB.1.00.1412081232500.13845@s15462909.onlinehome-server.info>
In-Reply-To
<20141208112835.GA15919@lanh>
Hi Duy,
On Mon, 8 Dec 2014, Duy Nguyen wrote:
Show 7 quoted lines
> On Mon, Dec 08, 2014 at 12:57:06AM -0500, Jeff King wrote:
> > I do admit that I am tempted to teach index-pack to always NUL-terminate
> > objects in memory that we feed to fsck, just to be on the safe side. It
> > doesn't cost much, and could prevent a silly mistake (either in the
> > future, or one that I missed in my analysis).
> 
> I think I'm missing a "but.." here.
The "but..."s I have are:
1) we potentially waste space, and
2) I would like to make really certain, preferably with static analysis,
   that fsck_object() only receives buffers that are NUL terminated, and
   that no call path is missed.

The patch looks good, of course, but I lack the broad overview of Git's source code - it has been years since I was familiar enough with it to know the places touching particular functions from the top of my head.

Ciao, Dscho

Previous: Duy NguyenNext: Jeff King
Message 6 of 10 in “fsck: properly bound "invalid tag name" error message”
  1. fsck: properly bound "invalid tag name" error messageJeff King, Dec 8, 2014
  2. Jeff KingDec 8, 2014
  3. Johannes SchindelinDec 8, 2014
  4. Jeff KingDec 8, 2014
  5. Duy NguyenDec 8, 2014
  6. Johannes SchindelinDec 8, 2014
  7. Jeff KingDec 8, 2014
  8. Johannes SchindelinDec 8, 2014
  9. index-pack: terminate object buffers with NULJohannes Schindelin, Dec 8, 2014
  10. Johannes SchindelinDec 8, 2014

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.