summaryrefslogtreecommitdiff
path: root/src/odb_loose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odb_loose.c')
-rw-r--r--src/odb_loose.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c
index 8ee01cd2c..4f475f2c3 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -434,6 +434,9 @@ static int read_header_loose(git_rawobj *out, const char *loc)
if ((read_bytes = read(fd, raw_buffer, sizeof(raw_buffer))) > 0) {
set_stream_input(&zs, raw_buffer, read_bytes);
z_return = inflate(&zs, 0);
+ } else {
+ z_return = Z_STREAM_END;
+ break;
}
} while (z_return == Z_OK);