aboutsummaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 10:56:06 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:11:37 -0800
commite08404a82d19a60fd60822e8c0d95dd5629e0809 (patch)
treefbdf1748be49f83e9c2dee7f0b34fae39d4458e7 /git.c
parent64f30e948be5fb2cd2f65e91c0eab5ab4719c636 (diff)
downloadgit-e08404a82d19a60fd60822e8c0d95dd5629e0809.tar.gz
git-e08404a82d19a60fd60822e8c0d95dd5629e0809.tar.xz
git.c: guard config parser from value=NULL
alias.* configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/git.c b/git.c
index 15fec8974..0cb86884d 100644
--- a/git.c
+++ b/git.c
@@ -93,6 +93,8 @@ static char *alias_string;
static int git_alias_config(const char *var, const char *value)
{
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
+ if (!value)
+ return config_error_nonbool(var);
alias_string = xstrdup(value);
}
return 0;