summaryrefslogtreecommitdiff
path: root/t/Git-SVN/Utils
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-08-19 14:12:41 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-04 09:36:28 -0700
commitc29edfefb6f6a3fef80172c16bcc34c826d417b0 (patch)
tree8441a329d59f164aa75f5f3752c420e459a7048b /t/Git-SVN/Utils
parentverify_absent: allow filenames longer than PATH_MAX (diff)
downloadtgif-c29edfefb6f6a3fef80172c16bcc34c826d417b0.tar.xz
notes: use a strbuf in add_non_note
When we are loading a notes tree into our internal hash table, we also collect any files that are clearly non-notes. We format the name of the file into a PATH_MAX buffer, but unlike true notes (which cannot be larger than a fanned-out sha1 hash), these tree entries can be arbitrarily long, overflowing our buffer. We can fix this by switching to a strbuf. It doesn't even cost us an extra allocation, as we can simply hand ownership of the buffer over to the non-note struct. This is of moderate security interest, as you might fetch notes trees from an untrusted remote. However, we do not do so by default, so you would have to manually fetch into the notes namespace. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/Git-SVN/Utils')
0 files changed, 0 insertions, 0 deletions