fix off-by-one in writepkt() length parameter passed by fetch_pack()
diff --git a/libexec/got-fetch-pack/got-fetch-pack.c b/libexec/got-fetch-pack/got-fetch-pack.c
index ece8d97..c8ca19d 100644
--- a/libexec/got-fetch-pack/got-fetch-pack.c
+++ b/libexec/got-fetch-pack/got-fetch-pack.c
@@ -561,7 +561,7 @@ fetch_pack(int fd, int packfd, struct got_object_id *packid,
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
- err = writepkt(fd, buf, n + 1);
+ err = writepkt(fd, buf, n);
if (err)
goto done;
nhave++;