From 2d4ddcffed5351f4564b497e786ae250b59ac96b Mon Sep 17 00:00:00 2001 From: Adam Murray Date: Fri, 4 Oct 2024 15:27:15 +1000 Subject: [PATCH] add null check for config value --- config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.c b/config.c index a11bb85da303a7..5ae8614e78628b 100644 --- a/config.c +++ b/config.c @@ -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;