diff --git a/sha1_file.c b/sha1_file.c
index 6dcae3882bf969cce9ae0a973a80abf76e3bb814..956422ba4a5df5f46caaf85f10e4c85321439272 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
while (c & 0x80) {
if (len <= used || bitsizeof(long) <= shift) {
error("bad object header");
while (c & 0x80) {
if (len <= used || bitsizeof(long) <= shift) {
error("bad object header");
- return 0;
+ size = used = 0;
+ break;
}
c = buf[used++];
size += (c & 0x7f) << shift;
}
c = buf[used++];
size += (c & 0x7f) << shift;