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 /Documentation/git-merge-index.txt | |
parent | Git 1.8.5 (diff) | |
download | tgif-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 'Documentation/git-merge-index.txt')
0 files changed, 0 insertions, 0 deletions