builtin-config.c: guard config parser from value=NULL
color configuration variables expect a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d865eb2a0d
commit
f769982d02
@ -168,6 +168,8 @@ static char parsed_color[COLOR_MAXLEN];
|
|||||||
static int git_get_color_config(const char *var, const char *value)
|
static int git_get_color_config(const char *var, const char *value)
|
||||||
{
|
{
|
||||||
if (!strcmp(var, get_color_slot)) {
|
if (!strcmp(var, get_color_slot)) {
|
||||||
|
if (!value)
|
||||||
|
config_error_nonbool(var);
|
||||||
color_parse(value, var, parsed_color);
|
color_parse(value, var, parsed_color);
|
||||||
get_color_found = 1;
|
get_color_found = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user