1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Make the regexp extension more robust against OOM errors during compilation

of the recognizer engine.
[forum:/forumpost/f50aecd5e8|Forum post f50aecd5e8].

FossilOrigin-Name: 0772ddf56713d013cd1bd44f9c75977ca14f852e3a8f038b0a6b9814f6519d79
This commit is contained in:
drh
2023-05-12 15:45:34 +00:00
parent fb74019a14
commit 4f3dc93978
3 changed files with 9 additions and 9 deletions

View File

@ -619,7 +619,7 @@ static const char *re_subcompile_string(ReCompiled *p){
if( rePeek(p)==']' ){ p->sIn.i++; break; }
}
if( c==0 ) return "unclosed '['";
p->aArg[iFirst] = p->nState - iFirst;
if( p->nState>iFirst ) p->aArg[iFirst] = p->nState - iFirst;
break;
}
case '\\': {