summaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
authorJay Soffian <jaysoffian@gmail.com>2008-02-18 10:20:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-19 03:19:06 (GMT)
commitb249b552e012824f1bd5026187bf9b895c2132c6 (patch)
tree2096cb6b41f418aec8603e3571c4b9d0a6433518 /builtin-checkout.c
parent79a1e6b432d7d7ffaf2079d4cf895583502ca923 (diff)
downloadgit-b249b552e012824f1bd5026187bf9b895c2132c6.zip
git-b249b552e012824f1bd5026187bf9b895c2132c6.tar.gz
git-b249b552e012824f1bd5026187bf9b895c2132c6.tar.bz2
builtin-checkout.c: fix possible usage segfault
Not terminating the options[] array with OPT_END can cause usage ("git checkout -h") output to segfault. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 9370ba0..0d19835 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -545,6 +545,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN( 0 , "track", &opts.track, "track"),
OPT_BOOLEAN('f', NULL, &opts.force, "force"),
OPT_BOOLEAN('m', NULL, &opts.merge, "merge"),
+ OPT_END(),
};
memset(&opts, 0, sizeof(opts));