Skip to content

Commit

Permalink
builtin-config.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
color configuration variables expect a string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 11, 2008
1 parent d865eb2 commit f769982
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ static char parsed_color[COLOR_MAXLEN];
static int git_get_color_config(const char *var, const char *value)
{
if (!strcmp(var, get_color_slot)) {
if (!value)
config_error_nonbool(var);
color_parse(value, var, parsed_color);
get_color_found = 1;
}
Expand Down

0 comments on commit f769982

Please sign in to comment.