Commit c56976dec112f63288e41d6ad4e93c9f29b4fc73

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

fix previous

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/lib/object.c b/lib/object.c
index 5df2df5..87f6288 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -235,9 +235,8 @@ 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);
+		memcpy(buf + totlen, zb.outbuf, outlen);
 		totlen += outlen;
 		i++;
 	} while (strchr(zb.outbuf, '\0') == NULL);