Skip to content

Commit 2d4ddcf

Browse files
committed
add null check for config value
1 parent 777489f commit 2d4ddcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ static int config_parse_pair(const char *key, const char *value,
615615

616616
if (!strlen(key))
617617
return error(_("empty config key"));
618+
if (!value || !strlen(value))
619+
return error(_("empty config value"));
618620
if (git_config_parse_key(key, &canonical_name, NULL))
619621
return -1;
620622

0 commit comments

Comments
 (0)