From: Alan T. DeKok Date: Wed, 25 Sep 2019 14:12:11 +0000 (-0400) Subject: cp->value can be NULL. Fixes #3008 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdbbd9ddf701f8b418385de2d5e24cff982e78a4;p=thirdparty%2Ffreeradius-server.git cp->value can be NULL. Fixes #3008 --- diff --git a/src/lib/server/cf_parse.c b/src/lib/server/cf_parse.c index 5c35f8a9ac5..1c05d5935a3 100644 --- a/src/lib/server/cf_parse.c +++ b/src/lib/server/cf_parse.c @@ -158,7 +158,7 @@ int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, UNUSED void *base, CONF_ITEM /* * Check for zero length strings */ - if ((cp->value[0] == '\0') && cant_be_empty) { + if (((!cp->value || cp->value[0] == '\0')) && cant_be_empty) { cf_log_err(cp, "Configuration pair \"%s\" must not be empty (zero length)", cf_pair_attr(cp)); if (!required) cf_log_err(cp, "Comment item to silence this message"); rcode = -1;