From ce1fa7f31350de9c67927e96ed0fb919a6b0838d Mon Sep 17 00:00:00 2001 From: RainRat Date: Sun, 19 Nov 2023 00:43:56 -0800 Subject: [PATCH] Update regex_suffix.c described in https://github.com/Cisco-Talos/clamav/issues/1085 --- libclamav/regex_suffix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclamav/regex_suffix.c b/libclamav/regex_suffix.c index 6161413467..e2cf6e0026 100644 --- a/libclamav/regex_suffix.c +++ b/libclamav/regex_suffix.c @@ -246,7 +246,7 @@ static uint8_t *parse_char_class(const uint8_t *pat, size_t patSize, size_t *pos for (c = range_start + 1; c <= range_end; c++) bitmap[c >> 3] ^= 1 << (c & 0x7); hasprev = 0; - } else if (pat[*pos] == '[' && pat[*pos] == ':') { + } else if (pat[*pos] == '[' && pat[*pos + 1] == ':') { /* char class */ FREE(bitmap); while (pat[*pos] != ']') INC_POS(pos, patSize);