diff --git a/sha1_file.c b/sha1_file.c
index 27f3b9b278a97f66f92ca61a2bc39e30f0a70317..833f5b9b5820ce60f9fb99f6c9bcdb313ae8fca9 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;