builtin-apply.c: guard config parser from value=NULL
apply.whitespace configuration expects a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Feb 11, 2008 at 10:44 UTC
a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e
1 file changed
+2
builtin-apply.c
+2
@@ -2746,6 +2746,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof)
2746
static int git_apply_config(const char *var, const char *value)
2747
{
2748
if (!strcmp(var, "apply.whitespace")) {
2749
+ if (!value)
2750
+ return config_error_nonbool(var);
2751
apply_default_whitespace = xstrdup(value);
2752
return 0;
2753
}