git.c: guard config parser from value=NULL
alias.* configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
64f30e948b
commit
e08404a82d
2
git.c
2
git.c
@ -93,6 +93,8 @@ static char *alias_string;
|
|||||||
static int git_alias_config(const char *var, const char *value)
|
static int git_alias_config(const char *var, const char *value)
|
||||||
{
|
{
|
||||||
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
|
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
|
||||||
|
if (!value)
|
||||||
|
return config_error_nonbool(var);
|
||||||
alias_string = xstrdup(value);
|
alias_string = xstrdup(value);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user