summaryrefslogtreecommitdiff
path: root/line-range.h
diff options
context:
space:
mode:
authorLibravatar David Sharp <dhsharp@google.com>2014-01-28 13:21:00 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-28 14:10:06 -0800
commita43219f2aaa39fbc53ba0aee2481e1cca3c0e649 (patch)
tree4f8d96983cf247a21d48df911ccb1a71a750074f /line-range.h
parentGit 1.8.5 (diff)
downloadtgif-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 'line-range.h')
0 files changed, 0 insertions, 0 deletions