Skip to content

Commit

Permalink
add null check for config value
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-murray committed Oct 8, 2024
1 parent 777489f commit 2d4ddcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ static int config_parse_pair(const char *key, const char *value,

if (!strlen(key))
return error(_("empty config key"));
if (!value || !strlen(value))
return error(_("empty config value"));
if (git_config_parse_key(key, &canonical_name, NULL))
return -1;

Expand Down

0 comments on commit 2d4ddcf

Please sign in to comment.