From: Alan T. DeKok Date: Fri, 20 Jan 2023 14:51:20 +0000 (-0500) Subject: partial parse is only if at eol, and depth==0, and terminal character X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf9494bbee3f3607bbd678498ec34d38d98ba48b;p=thirdparty%2Ffreeradius-server.git partial parse is only if at eol, and depth==0, and terminal character --- diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index 2178e3791f1..5a351f59805 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -1461,7 +1461,7 @@ static ssize_t fr_skip_condition(char const *start, char const *end, bool const /* * We've fallen off of the end of a string. It may be OK? */ - if (eol) *eol = true; + if (eol) *eol = (depth > 0); if (terminal && terminal[(uint8_t) *p]) return p - start; @@ -2447,9 +2447,9 @@ check_for_eol: } /* - * If don't hit EOL, then maybe we hit an end character? + * We parsed until the end of the string, but the condition still needs more data. */ - if (!eol && !terminal_end_line[(uint8_t) ptr[slen]]) { + if (eol) { ERROR("%s[%d]: FIXME: EOL continuation not implemented", frame->filename, frame->lineno); return -1; @@ -2457,8 +2457,6 @@ check_for_eol: /* * Keep a copy of the entire RHS. - * - * @todo - mark up the RHS as somehow an expression? */ memcpy(buff[2], ptr, slen); buff[2][slen] = '\0';