From: Alan T. DeKok Date: Sat, 21 Jan 2023 15:24:23 +0000 (-0500) Subject: if we can't parse a token, it must be an expression X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bae5067c5e050b57bb453b9e7508f43607dcfff;p=thirdparty%2Ffreeradius-server.git if we can't parse a token, it must be an expression --- diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index 5a351f59805..280d8f5d21f 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -2418,19 +2418,17 @@ check_for_eol: * In most cases, this is just one word. In some cases it's not. So we peek ahead to see. */ if (cf_get_token(parent, &ptr2, &value_token, buff[2], stack->bufsize, - frame->filename, frame->lineno) < 0) { - return -1; - } - value = buff[2]; - - /* - * The thing after the token is "end of line" in some format, so it's fine. - */ - fr_skip_whitespace(ptr2); - if (terminal_end_line[(uint8_t) *ptr2]) { - ptr = ptr2; - goto alloc_pair; - } + frame->filename, frame->lineno) == 0) { + /* + * The thing after the token is "end of line" in some format, so it's fine. + */ + fr_skip_whitespace(ptr2); + if (terminal_end_line[(uint8_t) *ptr2]) { + ptr = ptr2; + value = buff[2]; + goto alloc_pair; + } + } /* else it looks like an expression */ /* * Otherwise we reparse the thing as an expression.