diff options
author | Erik Elfström <erik.elfstrom@gmail.com> | 2015-06-15 21:39:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-15 13:14:01 -0700 |
commit | 921bdd96afc17ca055af261066eabdf026cb2195 (patch) | |
tree | 4fb673cb9182575f264e4564f9981d862b993108 /t/t3700-add.sh | |
parent | setup: add gentle version of read_gitfile (diff) | |
download | tgif-921bdd96afc17ca055af261066eabdf026cb2195.tar.xz |
setup: sanity check file size in read_gitfile_gently
read_gitfile_gently will allocate a buffer to fit the entire file that
should be read. Add a sanity check of the file size before opening to
avoid allocating a potentially huge amount of memory if we come across
a large file that someone happened to name ".git". The limit is set to
a sufficiently unreasonable size that should never be exceeded by a
genuine .git file.
Signed-off-by: Erik Elfström <erik.elfstrom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3700-add.sh')
0 files changed, 0 insertions, 0 deletions