From: Junio C Hamano Date: Mon, 11 Feb 2008 18:44:49 +0000 (-0800) Subject: builtin-apply.c: guard config parser from value=NULL X-Git-Tag: v1.5.4.2~48 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e;p=git.git builtin-apply.c: guard config parser from value=NULL apply.whitespace configuration expects a string value. Signed-off-by: Junio C Hamano --- diff --git a/builtin-apply.c b/builtin-apply.c index 15432b678..a11b1bbee 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -2746,6 +2746,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof) static int git_apply_config(const char *var, const char *value) { if (!strcmp(var, "apply.whitespace")) { + if (!value) + return config_error_nonbool(var); apply_default_whitespace = xstrdup(value); return 0; }