summaryrefslogtreecommitdiff
path: root/progress.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-09-24 21:06:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-25 17:18:18 (GMT)
commitc3bb0ac796c21490f478914441526817e4685606 (patch)
tree59e6bba21c971116ee5afdf3de2020d54d03d553 /progress.c
parentef1286d3c0ba714c6c2ae87e14edf3c462aef114 (diff)
downloadgit-c3bb0ac796c21490f478914441526817e4685606.zip
git-c3bb0ac796c21490f478914441526817e4685606.tar.gz
git-c3bb0ac796c21490f478914441526817e4685606.tar.bz2
find_short_object_filename: convert sprintf to xsnprintf
We use sprintf() to format some hex data into a buffer. The buffer is clearly long enough, and using snprintf here is not necessary. And in fact, it does not really make anything easier to audit, as the size we feed to snprintf accounts for the magic extra 42 bytes found in each alt->name field of struct alternate_object_database (which is there exactly to do this formatting). Still, it is nice to remove an sprintf call and replace it with an xsnprintf and explanatory comment, which makes it easier to audit the code base for overflows. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'progress.c')
0 files changed, 0 insertions, 0 deletions