From: Nick Porter Date: Wed, 13 Apr 2022 11:01:59 +0000 (+0100) Subject: Avoid array overrun. CID #1504011 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5baf33200eb4d7ca400f02d386181fbc11672a61;p=thirdparty%2Ffreeradius-server.git Avoid array overrun. CID #1504011 --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index e9b3379b618..9493ad96cf6 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -4450,7 +4450,7 @@ void tmpl_verify(char const *file, int line, tmpl_t const *vpt) } if (!vpt->name && (vpt->quote != T_INVALID)) { - char quote = vpt->quote > T_TOKEN_LAST ? '?' : fr_token_quote[vpt->quote]; + char quote = vpt->quote >= T_TOKEN_LAST ? '?' : fr_token_quote[vpt->quote]; fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: Quote type '%c' (%i) was set for NULL name", file, line, quote, vpt->quote);