builtin-show-branch.c: guard config parser from value=NULL
showbranch.default configuration expects a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4f342b96d1
commit
4f9c412bf7
@ -536,6 +536,8 @@ static void append_one_rev(const char *av)
|
|||||||
static int git_show_branch_config(const char *var, const char *value)
|
static int git_show_branch_config(const char *var, const char *value)
|
||||||
{
|
{
|
||||||
if (!strcmp(var, "showbranch.default")) {
|
if (!strcmp(var, "showbranch.default")) {
|
||||||
|
if (!value)
|
||||||
|
return config_error_nonbool(var);
|
||||||
if (default_alloc <= default_num + 1) {
|
if (default_alloc <= default_num + 1) {
|
||||||
default_alloc = default_alloc * 3 / 2 + 20;
|
default_alloc = default_alloc * 3 / 2 + 20;
|
||||||
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
|
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user