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>
Jay Soffian committed
Feb 18, 2008 at 05:20 UTC
b249b552e012824f1bd5026187bf9b895c2132c6
1 file changed
+1
builtin-checkout.c
+1
@@ -545,6 +545,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
545
OPT_BOOLEAN( 0 , "track", &opts.track, "track"),
546
OPT_BOOLEAN('f', NULL, &opts.force, "force"),
547
OPT_BOOLEAN('m', NULL, &opts.merge, "merge"),
548
+ OPT_END(),
549
};
550
551
memset(&opts, 0, sizeof(opts));