Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/send-email-complete-aliases'
[gitweb.git]
/
builtin
/
index-pack.c
diff --git
a/builtin/index-pack.c
b/builtin/index-pack.c
index 3431de2362d981b1239d8269d17fb75d8de094fd..1ad1bde69600d3097d71ed67d230d2e2f916544e 100644
(file)
--- a/
builtin/index-pack.c
+++ b/
builtin/index-pack.c
@@
-441,7
+441,7
@@
static void *unpack_entry_data(unsigned long offset, unsigned long size,
int hdrlen;
if (!is_delta_type(type)) {
- hdrlen =
sprintf(hdr
, "%s %lu", typename(type), size) + 1;
+ hdrlen =
xsnprintf(hdr, sizeof(hdr)
, "%s %lu", typename(type), size) + 1;
git_SHA1_Init(&c);
git_SHA1_Update(&c, hdr, hdrlen);
} else