Fix loose object uncompression check.
commit456cdf6edbf0c14b75fd9048708e9abea43e6aa1
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 20 Mar 2007 05:49:53 +0000 (19 22:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 20 Mar 2007 06:13:17 +0000 (19 23:13 -0700)
treea6ff1b062b8c3a6c20b0d03bfa938c6a5ed070b4
parent3e993bb657daad31d8a7b1ef0a6a9f73bdd5f950
Fix loose object uncompression check.

The thing is, if the output buffer is empty, we should *still* actually
use the zlib routines to *unpack* that empty output buffer.

But we had a test that said "only unpack if we still expect more output".

So we wouldn't use up all the zlib stream, because we felt that we didn't
need it, because we already had all the bytes we wanted. And it was
"true": we did have all the output data. We just needed to also eat all
the input data!

We've had this bug before - thinking that we don't need to inflate()
anything because we already had it all..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c