aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fast-import.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c
index 9ae2053a8..87c4e7e40 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1237,9 +1237,7 @@ static void stream_blob(uintmax_t len, unsigned char *sha1out, uintmax_t mark)
sha1file_checkpoint(pack_file, &checkpoint);
offset = checkpoint.offset;
- hdrlen = snprintf((char *)out_buf, out_sz, "blob %" PRIuMAX, len) + 1;
- if (out_sz <= hdrlen)
- die("impossibly large object header");
+ hdrlen = xsnprintf((char *)out_buf, out_sz, "blob %" PRIuMAX, len) + 1;
git_SHA1_Init(&c);
git_SHA1_Update(&c, out_buf, hdrlen);