From: Jay Soffian Date: Mon, 18 Feb 2008 10:20:20 +0000 (-0500) Subject: builtin-checkout.c: fix possible usage segfault X-Git-Tag: v1.5.5-rc0~132^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b249b552e012824f1bd5026187bf9b895c2132c6;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-checkout.c b/builtin-checkout.c index 9370ba07b..0d19835a6 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));