fix previous
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);