Merge branch 'lt/maint-wrap-zlib'
* lt/maint-wrap-zlib: Wrap inflate and other zlib routines for better error reporting Conflicts: http-push.c http-walker.c sha1_file.c
This commit is contained in:
@ -195,16 +195,16 @@ static int check_pack_inflate(struct packed_git *p,
|
||||
int st;
|
||||
|
||||
memset(&stream, 0, sizeof(stream));
|
||||
inflateInit(&stream);
|
||||
git_inflate_init(&stream);
|
||||
do {
|
||||
in = use_pack(p, w_curs, offset, &stream.avail_in);
|
||||
stream.next_in = in;
|
||||
stream.next_out = fakebuf;
|
||||
stream.avail_out = sizeof(fakebuf);
|
||||
st = inflate(&stream, Z_FINISH);
|
||||
st = git_inflate(&stream, Z_FINISH);
|
||||
offset += stream.next_in - in;
|
||||
} while (st == Z_OK || st == Z_BUF_ERROR);
|
||||
inflateEnd(&stream);
|
||||
git_inflate_end(&stream);
|
||||
return (st == Z_STREAM_END &&
|
||||
stream.total_out == expect &&
|
||||
stream.total_in == len) ? 0 : -1;
|
||||
|
Reference in New Issue
Block a user