summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 18:44:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:36 (GMT)
commita0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e (patch)
tree28de5619f5f67cb9a5d82be001f226c55ed823da
parent40ea4ed9032a80c9dba706d6030bd11b08c35f4d (diff)
downloadgit-a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e.zip
git-a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e.tar.gz
git-a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e.tar.bz2
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>
-rw-r--r--builtin-apply.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 15432b6..a11b1bb 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;
}