From: Arran Cudbard-Bell Date: Tue, 13 Mar 2018 18:13:18 +0000 (+0000) Subject: Fix multi section pass2 parsing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883f0c5a2d43f3312e63e4847f60f5eb484528a3;p=thirdparty%2Ffreeradius-server.git Fix multi section pass2 parsing --- diff --git a/src/main/cf_parse.c b/src/main/cf_parse.c index 7dbe1ad8968..de2bebcd30d 100644 --- a/src/main/cf_parse.c +++ b/src/main/cf_parse.c @@ -1226,14 +1226,10 @@ int cf_section_parse_pass2(void *base, CONF_SECTION *cs) size_t j, len; uint8_t **array; - array = (uint8_t **)((uint8_t *)base) + rule->offset; + array = *(uint8_t ***)(((uint8_t *)base) + rule->offset); len = talloc_array_length(array); - for (j = 0; j < len; j++) { - if (cf_section_parse_pass2(array[j], subcs) < 0) { - return -1; - } - } + for (j = 0; j < len; j++) if (cf_section_parse_pass2(array[j], subcs) < 0) return -1; continue; } else { subcs_base = (uint8_t *)base + rule->offset;