mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-06 18:52:21 +00:00
Merge pull request #2301 from libgit2/cmn/pack-objects-memory
Keep the deflate buffer from ballooning up
This commit is contained in:
commit
ec77105889
@ -406,6 +406,7 @@ static int write_one(
|
||||
po->delta = NULL;
|
||||
}
|
||||
|
||||
*status = WRITE_ONE_WRITTEN;
|
||||
po->written = 1;
|
||||
po->recursing = 0;
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ int git_zstream_deflatebuf(git_buf *out, const void *in, size_t in_len)
|
||||
while (!git_zstream_done(&zs)) {
|
||||
size_t step = git_zstream_suggest_output_len(&zs), written;
|
||||
|
||||
if ((error = git_buf_grow(out, out->asize + step)) < 0)
|
||||
if ((error = git_buf_grow(out, out->size + step)) < 0)
|
||||
goto done;
|
||||
|
||||
written = out->asize - out->size;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user