Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

Re: [PATCH 5/8] get-repack --max-pack-size: write_object() takes 'limit' arg

From: Dana How <hidden>
Date: 2016-06-15 22:43:03

On 4/9/07, Nicolas Pitre [off-list ref] wrote:
On Mon, 9 Apr 2007, Dana How wrote:
quoted
On 4/8/07, Nicolas Pitre [off-list ref] wrote:
quoted
quoted
+                     sha1write(f, header, hdrlen);
                      sha1write(f, header + pos, sizeof(header) - pos);
The above looks rather buggy to me.
OK, can you be more specific?
You're writing the content of the array 'header' twice in a row.  Sure
the second time it is header + pos but it is still the result of an
operation that used to put data into 'header' after the first content
was already written out.  Right now it looks like the first write might
contain clobbered data.
Thanks,  I'll take care of that.

For testing, I've been using git-fsck/git-verify-pack/git-unpack-objects .
The only bugs they ever caught were (1) offset wraparound in .idx
before I started this patchset (with a very bad error message) and
(2) I failed to flush out the buffer before changing packs.
Everything else has been detected manually (not always by me).  Hmm.

Thanks,
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help