Skip to content

Commit

Permalink
builtin-apply.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
apply.whitespace configuration expects a string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 11, 2008
1 parent 40ea4ed commit a0ed3e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a0ed3e6

Please sign in to comment.