diff options
author | Frank Lichtenheld <flichtenheld@astaro.com> | 2009-04-18 16:14:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-18 13:06:40 -0700 |
commit | 32d1776b1341c17b99da862e80ddf151a5b558fe (patch) | |
tree | 6917dd74528fbc8397edf2a3f9786504bab3430e /t | |
parent | e0b3cc0dffbc965ffa33155cbdcf8d44716c134c (diff) | |
download | git-32d1776b1341c17b99da862e80ddf151a5b558fe.tar.gz git-32d1776b1341c17b99da862e80ddf151a5b558fe.tar.xz |
init: Do not segfault on big GIT_TEMPLATE_DIR environment variable
Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0001-init.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 5ac0a273a..e3d846420 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -199,4 +199,13 @@ test_expect_success 'init honors global core.sharedRepository' ' x`git config -f shared-honor-global/.git/config core.sharedRepository` ' +test_expect_success 'init rejects insanely long --template' ' + ( + insane=$(printf "x%09999dx" 1) && + mkdir test && + cd test && + test_must_fail git init --template=$insane + ) +' + test_done |