From b249b552e012824f1bd5026187bf9b895c2132c6 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Mon, 18 Feb 2008 05:20:20 -0500 Subject: [PATCH] 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 --- builtin-checkout.c | 1 + 1 file changed, 1 insertion(+) 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)); -- 2.30.2