summaryrefslogtreecommitdiff
path: root/builtin/credential.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-03-28 15:46:50 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-30 14:59:50 -0700
commit5b1ef2cef4ff9d3213ec81465b99affb4a7c8083 (patch)
treedca13ceebc0aadd97f91bfcab3299407a10e6523 /builtin/credential.c
parentreceive-pack: print --pack-header directly into argv array (diff)
downloadtgif-5b1ef2cef4ff9d3213ec81465b99affb4a7c8083.tar.xz
replace unchecked snprintf calls with heap buffers
We'd prefer to avoid unchecked snprintf calls because truncation can lead to unexpected results. These are all cases where truncation shouldn't ever happen, because the input to snprintf is fixed in size. That makes them candidates for xsnprintf(), but it's simpler still to just use the heap, and then nobody has to wonder if "100" is big enough. We'll use xstrfmt() where possible, and a strbuf when we need the resulting size or to reuse the same buffer in a loop. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/credential.c')
0 files changed, 0 insertions, 0 deletions