diff options
author | Jeff King <peff@peff.net> | 2017-03-16 10:27:15 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-16 11:26:18 -0700 |
commit | ba47a3088f04ac3d2833bea56ee366be1054db8d (patch) | |
tree | c49b7d2f4b1cc19d517e046b04f61c3cf7a2aa14 /http-push.c | |
parent | eaeefc3276c45ff8f8c24775b7dd93155bef7d48 (diff) | |
download | git-ba47a3088f04ac3d2833bea56ee366be1054db8d.tar.gz git-ba47a3088f04ac3d2833bea56ee366be1054db8d.tar.xz |
replace snprintf with odb_pack_name()
In several places we write the name of the pack filename
into a fixed-size buffer using snprintf(), but do not check
the return value. As a result, a very long object directory
could cause us to quietly truncate the pack filename
(potentially leading to a corrupted repository, as a newly
written packfile could be missing its .pack extension).
We can use odb_pack_name() to do this with a strbuf (and
shorten the code, as well).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-push.c')
0 files changed, 0 insertions, 0 deletions