mirror of
https://github.com/git/git.git
synced 2024-06-01 19:26:10 +02:00
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>
This commit is contained in:
parent
79a1e6b432
commit
b249b552e0
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue