mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4425 REGEXP enhancements
Adding pcre_stack_guard to avoid crashes in pcre_compile() on a long recursive patterns with parenthesizes: SELECT a RLIKE '((((...((((x)))...))))';
This commit is contained in:
@ -7107,6 +7107,12 @@ unsigned int orig_bracount;
|
||||
unsigned int max_bracount;
|
||||
branch_chain bc;
|
||||
|
||||
if (pcre_stack_guard && pcre_stack_guard())
|
||||
{
|
||||
*errorcodeptr= ERR23;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bc.outer = bcptr;
|
||||
bc.current_branch = code;
|
||||
|
||||
|
Reference in New Issue
Block a user