diff options
author | Jeff King <peff@peff.net> | 2018-05-18 18:58:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-21 09:59:03 +0900 |
commit | bf4baf1fed7916ed10f2759a6f30a38990a83cae (patch) | |
tree | 628870d63e3bd54eda71a2f0b6fb971f995585cd /t/lib-pack.sh | |
parent | fsmonitor: use internal argv_array of struct child_process (diff) | |
download | tgif-bf4baf1fed7916ed10f2759a6f30a38990a83cae.tar.xz |
shorten_unambiguous_ref: use xsnprintf
We convert the ref_rev_parse_rules array into scanf formats
on the fly, and use snprintf() to write into each string. We
should have enough memory to hold everything because of the
earlier total_len computation. Let's use xsnprintf() to
give runtime confirmation that this is the case, and to make
it easy for people auditing the code to know there's no
truncation bug.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-pack.sh')
0 files changed, 0 insertions, 0 deletions