summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 18:48:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:36 (GMT)
commitf769982d02f70534789593e2bab889c9aa3a641c (patch)
treea00109eb851e62154133e2a2aac4fb740d684521
parentd865eb2a0d5f121a46dfcc18c78e7f27e0af0fbc (diff)
downloadgit-f769982d02f70534789593e2bab889c9aa3a641c.zip
git-f769982d02f70534789593e2bab889c9aa3a641c.tar.gz
git-f769982d02f70534789593e2bab889c9aa3a641c.tar.bz2
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>
-rw-r--r--builtin-config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-config.c b/builtin-config.c
index e4a12e3..077d8ef 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;
}