Skip to content

Commit

Permalink
convert.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
filter.*.smudge and filter.*.clean configuration variables expect a
string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Feb 11, 2008
1 parent c64b9ad commit a7269e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,14 @@ static int read_convert_config(const char *var, const char *value)

if (!strcmp("smudge", ep)) {
if (!value)
return error("%s: lacks value", var);
return config_error_nonbool(var);
drv->smudge = strdup(value);
return 0;
}

if (!strcmp("clean", ep)) {
if (!value)
return error("%s: lacks value", var);
return config_error_nonbool(var);
drv->clean = strdup(value);
return 0;
}
Expand Down

0 comments on commit a7269e5

Please sign in to comment.