@matheusbsbs / matheus-bagliano / commits / e08404a82d
Fork 0

git.c: guard config parser from value=NULL

alias.* configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 11, 2008 at 10:56 UTC e08404a82d19a60fd60822e8c0d95dd5629e0809
1 file changed +2
git.c
+2
@@ -93,6 +93,8 @@ static char *alias_string;
93 static int git_alias_config(const char *var, const char *value)
94 {
95 if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
96 + if (!value)
97 + return config_error_nonbool(var);
98 alias_string = xstrdup(value);
99 }
100 return 0;