]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/merge-index.c
convert trivial sprintf / strcpy calls to xsnprintf
[thirdparty/git.git] / builtin / merge-index.c
index 1a1eafa6fdc2e9dc66c98d3a81b7ee50e44727da..1d6611191791ff66822b4a534e3c8dd1a6b9e473 100644 (file)
@@ -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);