Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)

This commit is contained in:
tabudz 2025-02-28 22:29:03 +08:00
parent ca6fba42cc
commit 55489ea323

View File

@ -1150,6 +1150,7 @@ compile_string_node(Node* node, regex_t* reg)
for (; p < end; ) {
len = enclen(enc, p);
if (p + len > end) len = end - p;
if (len == prev_len) {
slen++;
}