]> git.ipfire.org Git - thirdparty/git.git/commit - entry.c
entry.c: convert strcpy to xsnprintf
authorJeff King <peff@peff.net>
Thu, 24 Sep 2015 21:06:53 +0000 (17:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Sep 2015 17:18:18 +0000 (10:18 -0700)
commit330c8e26701c33f1d74dbe3c2692f29b5ed4ba5f
tree3eb1ae60ae92a3d2ed8f36216bb207847947ee23
parent19bdd3e7e160a0b000c15d8bf6d33f4149e3f911
entry.c: convert strcpy to xsnprintf

This particular conversion is non-obvious, because nobody
has passed our function the length of the destination
buffer. However, the interface to checkout_entry specifies
that the buffer must be at least TEMPORARY_FILENAME_LENGTH
bytes long, so we can check that (meaning the existing code
was not buggy, but merely worrisome to somebody reading it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
entry.c