aboutsummaryrefslogtreecommitdiff
path: root/builtin/merge-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/merge-index.c')
-rw-r--r--builtin/merge-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 1a1eafa6f..1d6611191 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -23,7 +23,7 @@ static int merge_entry(int pos, const char *path)
break;
found++;
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
- sprintf(ownbuf[stage], "%o", ce->ce_mode);
+ xsnprintf(ownbuf[stage], sizeof(ownbuf[stage]), "%o", ce->ce_mode);
arguments[stage] = hexbuf[stage];
arguments[stage + 4] = ownbuf[stage];
} while (++pos < active_nr);