From: Junio C Hamano Date: Mon, 11 Feb 2008 19:00:32 +0000 (-0800) Subject: setup.c: guard config parser from value=NULL X-Git-Tag: v1.5.4.2~32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=180483c5c94a37c9fe304dded99d3db56d2d2b38;p=git.git setup.c: guard config parser from value=NULL core.worktree expects a string value Signed-off-by: Junio C Hamano --- diff --git a/setup.c b/setup.c index adede16a4..4509598d5 100644 --- a/setup.c +++ b/setup.c @@ -372,6 +372,8 @@ int check_repository_format_version(const char *var, const char *value) if (is_bare_repository_cfg == 1) inside_work_tree = -1; } else if (strcmp(var, "core.worktree") == 0) { + if (!value) + return config_error_nonbool(var); if (git_work_tree_cfg) free(git_work_tree_cfg); git_work_tree_cfg = xstrdup(value);