Skip to content

Commit

Permalink
builtin-show-branch.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
showbranch.default 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 4f342b9 commit 4f9c412
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-show-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ static void append_one_rev(const char *av)
static int git_show_branch_config(const char *var, const char *value)
{
if (!strcmp(var, "showbranch.default")) {
if (!value)
return config_error_nonbool(var);
if (default_alloc <= default_num + 1) {
default_alloc = default_alloc * 3 / 2 + 20;
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
Expand Down

0 comments on commit 4f9c412

Please sign in to comment.