1
0
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:
Alexander Barkov
2013-10-02 11:58:29 +04:00
parent d83648f25a
commit fcf992ba4c
4 changed files with 27 additions and 8 deletions

View File

@ -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;