Thread (14 messages) flat view 14 messages, 7 authors, 2016-06-15

Re: git hang with corrupted .pack

From: Alex Riesen <hidden>
Date: 2016-06-15 22:47:35

On Tue, Oct 20, 2009 at 17:23, Sverre Rabbelier [off-list ref] wrote:
Heya,

On Tue, Oct 20, 2009 at 10:14, Alex Riesen [off-list ref] wrote:
quoted
-       buffer = xmalloc(size + 1);
+       buffer = xmalloc(size + 8);
quoted
-       stream.avail_out = size;
+       stream.avail_out = size + 8;
That seems wrong at first glance, you go from '+1' to '+8' on the
first part, and then from '+0' to '+8' in the second part, am I
missing something obvious?
Yes. The "size" (the variable) is never changed. It is just the output
buffer size, not how many data expected or something like that.
IOW, I just wanted the buffer to be obviously (to zlib) more than enough.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help