summaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 10:48:12 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:11:36 -0800
commitf769982d02f70534789593e2bab889c9aa3a641c (patch)
treea00109eb851e62154133e2a2aac4fb740d684521 /builtin-config.c
parentd865eb2a0d5f121a46dfcc18c78e7f27e0af0fbc (diff)
downloadgit-f769982d02f70534789593e2bab889c9aa3a641c.tar.gz
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>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-config.c b/builtin-config.c
index e4a12e3166..077d8ef2df 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -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;
}