aboutsummaryrefslogtreecommitdiff
path: root/t/t7503-pre-commit-hook.sh
diff options
context:
space:
mode:
authorDavid Sharp <dhsharp@google.com>2014-01-28 13:21:00 -0800
committerJunio C Hamano <gitster@pobox.com>2014-01-28 14:10:06 -0800
commita43219f2aaa39fbc53ba0aee2481e1cca3c0e649 (patch)
tree4f8d96983cf247a21d48df911ccb1a71a750074f /t/t7503-pre-commit-hook.sh
parentd2446dfd7f3b3f8948142cfb07a0270e2497d93f (diff)
downloadgit-a43219f2aaa39fbc53ba0aee2481e1cca3c0e649.tar.gz
git-a43219f2aaa39fbc53ba0aee2481e1cca3c0e649.tar.xz
rev-parse: check i before using argv[i] against argc
The --prefix, --default, and --resolve-git-dir options to git-rev-parse require an argument, but when given no argument, the code uses the NULL read from argv[argc] without checking, leading to a segfault. Instead, check first and die() with an error message. Signed-off-by: David Sharp <dhsharp@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7503-pre-commit-hook.sh')
0 files changed, 0 insertions, 0 deletions