summaryrefslogtreecommitdiff
path: root/remote-testsvn.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-09-24 17:06:55 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-25 10:18:18 -0700
commit48bcc1c3cc09db1a6da0ce47460fae6e5f7edd4b (patch)
tree67e3469fd97096b0f49c91600abbedea8208931a /remote-testsvn.c
parententry.c: convert strcpy to xsnprintf (diff)
downloadtgif-48bcc1c3cc09db1a6da0ce47460fae6e5f7edd4b.tar.xz
add_packed_git: convert strcpy into xsnprintf
We have the path "foo.idx", and we create a buffer big enough to hold "foo.pack" and "foo.keep", and then strcpy straight into it. This isn't a bug (we have enough space), but it's very hard to tell from the strcpy that this is so. Let's instead use strip_suffix to take off the ".idx", record the size of our allocation, and use xsnprintf to make sure we don't violate our assumptions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-testsvn.c')
0 files changed, 0 insertions, 0 deletions