Skip to content

Commit

Permalink
trace2: prevent segfault on config collection where no value specified
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-murray committed Oct 8, 2024
1 parent 777489f commit b696097
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 b696097

Please sign in to comment.