1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 05:36:09 +02:00

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>
This commit is contained in:
Junio C Hamano 2008-02-11 10:44:49 -08:00
parent 40ea4ed903
commit a0ed3e6ade

View File

@ -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;
}