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

Re: [RFC PATCH 4/5] pack-objects: avoid reading uninitalized data

From
Nicolas Pitre <nico@cam.org>
Date
Oct 23, 2008, 16:47 UTC
Message-ID
<alpine.LFD.2.00.0810231246040.26244@xanadu.home>
In-Reply-To
<20081023153329.GC10804@coredump.intra.peff.net>
On Thu, 23 Oct 2008, Jeff King wrote:
Show 23 quoted lines
> On Wed, Oct 22, 2008 at 09:11:16PM -0400, Nicolas Pitre wrote:
> 
> > >  	for (;;) {
> > > -		struct object_entry *entry = *list++;
> > > +		struct object_entry *entry;
> > >  		struct unpacked *n = array + idx;
> > >  		int j, max_depth, best_base = -1;
> > >  
> > > @@ -1384,6 +1384,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
> > >  			progress_unlock();
> > >  			break;
> > >  		}
> > 
> > ---> Please preserve the empty line here so the previous code
> >      chunk still appears logically separate.
> > 
> > > +		entry = *list++;
> > >  		(*list_size)--;
> > >  		if (!entry->preferred_base) {
> > >  			(*processed)++;
> 
> Er, there was no empty line there (or else there would have been a '-'
> line in the diff).

Oh, right. I'm confused. Nevermind...

Nicolas
Previous: Jeff KingNext: Jeff King
Message 12 of 13 in “valgrind in test scripts”
  1. 0/5 valgrind in test scriptsJeff King, Oct 22, 2008
  2. 1/5 add valgrind support in test scriptsJeff King, Oct 22, 2008
  3. Johannes SchindelinOct 22, 2008
  4. Junio C HamanoOct 23, 2008
  5. Jeff KingOct 23, 2008
  6. Jeff KingOct 23, 2008
  7. 2/5 valgrind: ignore ldso errorsJeff King, Oct 22, 2008
  8. 3/5 correct cache_entry allocationJeff King, Oct 22, 2008
  9. 4/5 pack-objects: avoid reading uninitalized dataJeff King, Oct 22, 2008
  10. Nicolas PitreOct 23, 2008
  11. Jeff KingOct 23, 2008
  12. Nicolas PitreOct 23, 2008
  13. 5/5 fix overlapping memcpy in normalize_absolute_pathJeff King, Oct 22, 2008

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.