Skip to content

Commit

Permalink
git.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
alias.* 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 64f30e9 commit e08404a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ static char *alias_string;
static int git_alias_config(const char *var, const char *value)
{
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
if (!value)
return config_error_nonbool(var);
alias_string = xstrdup(value);
}
return 0;
Expand Down

0 comments on commit e08404a

Please sign in to comment.