From: Alan T. DeKok Date: Wed, 6 Nov 2019 17:22:14 +0000 (-0500) Subject: check for memory allocation failures X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e36e48e32c23fbf6c0ed3149263bd5540bfcd356;p=thirdparty%2Ffreeradius-server.git check for memory allocation failures --- diff --git a/src/lib/server/cf_parse.c b/src/lib/server/cf_parse.c index dfed273a33d..f353d567178 100644 --- a/src/lib/server/cf_parse.c +++ b/src/lib/server/cf_parse.c @@ -683,6 +683,8 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o return -1; /* Unsupported type */ } + if (!array) return -1; + for (i = 0; i < count; i++, cp = cf_pair_find_next(cs, cp, rule->name)) { int ret; cf_parse_t func;