summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-09-24 21:06:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-25 17:18:18 (GMT)
commit0cc41428596ec1cd3862918ef781793ef7346ba5 (patch)
treee24056a8c9430b9d9f58dc4e416931a00c396cf9 /unpack-trees.c
parent48bcc1c3cc09db1a6da0ce47460fae6e5f7edd4b (diff)
downloadgit-0cc41428596ec1cd3862918ef781793ef7346ba5.zip
git-0cc41428596ec1cd3862918ef781793ef7346ba5.tar.gz
git-0cc41428596ec1cd3862918ef781793ef7346ba5.tar.bz2
http-push: replace strcat with xsnprintf
We account for these strcats in our initial allocation, but the code is confusing to follow and verify. Let's remember our original allocation length, and then xsnprintf can verify that we don't exceed it. Note that we can't just use xstrfmt here (which would be even cleaner) because the code tries to grow the buffer only when necessary. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
0 files changed, 0 insertions, 0 deletions