Commit 6cb5fd0d572af5d0966856cd62536c8cc6cb65de

Stefan Sperling 2017-12-02T00:45:51

don't overwrite already decompressed data

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/object.c b/lib/object.c
index f9e0057..5df2df5 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -235,6 +235,7 @@ read_object_header(struct got_object **obj, struct got_repository *repo,
 				err = got_error(GOT_ERR_NO_MEM);
 				goto done;
 			}
+			buf += totlen;
 		}
 		memcpy(buf, zb.outbuf, outlen);
 		totlen += outlen;