summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-03-24 17:25:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-24 19:34:07 (GMT)
commit614b19542f649945774a084f2bcf56191f46947c (patch)
treebd0d963f1126a22baacda94c821958c5eba16a1a /builtin/pack-objects.c
parent296ab786eed237b59f76f6411e895cc1e3ce14ab (diff)
downloadgit-614b19542f649945774a084f2bcf56191f46947c.zip
git-614b19542f649945774a084f2bcf56191f46947c.tar.gz
git-614b19542f649945774a084f2bcf56191f46947c.tar.bz2
fast-import: use xsnprintf for writing sha1s
When we have to write a sha1 with a newline, we do so by copying both into a single buffer, so that we can issue a single write() call. We use snprintf but don't bother to check the output, since we know it will fit. However, we should use xsnprintf() in such a case so that we're notified if our assumption turns out to be wrong (and to make it easier to audit for unchecked snprintf calls). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
0 files changed, 0 insertions, 0 deletions