summaryrefslogtreecommitdiff
path: root/compat/vcbuild/scripts
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-09-24 17:07:03 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-25 10:18:18 -0700
commit75faa45ae0230b321bf72027b2274315d7e14e34 (patch)
tree3b4aa1b362078ba4db498a087f3330ffe7affbd8 /compat/vcbuild/scripts
parentreceive-pack: convert strncpy to xsnprintf (diff)
downloadtgif-75faa45ae0230b321bf72027b2274315d7e14e34.tar.xz
replace trivial malloc + sprintf / strcpy calls with xstrfmt
It's a common pattern to do: foo = xmalloc(strlen(one) + strlen(two) + 1 + 1); sprintf(foo, "%s %s", one, two); (or possibly some variant with strcpy()s or a more complicated length computation). We can switch these to use xstrfmt, which is shorter, involves less error-prone manual computation, and removes many sprintf and strcpy calls which make it harder to audit the code for real buffer overflows. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/vcbuild/scripts')
0 files changed, 0 insertions, 0 deletions