diff options
author | David Sharp <dhsharp@google.com> | 2014-01-28 13:21:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-28 14:10:06 -0800 |
commit | a43219f2aaa39fbc53ba0aee2481e1cca3c0e649 (patch) | |
tree | 4f8d96983cf247a21d48df911ccb1a71a750074f /t/t7503-pre-commit-hook.sh | |
parent | d2446dfd7f3b3f8948142cfb07a0270e2497d93f (diff) | |
download | git-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