From: drh <> Date: Mon, 18 Jul 2022 13:10:53 +0000 (+0000) Subject: Fix a problem in the REGEXP extension for the {M,N} construct where M is zero. X-Git-Tag: version-3.40.0~294 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18934137ddfd765025e73b2eb1a1bb83ee5fc03b;p=thirdparty%2Fsqlite.git Fix a problem in the REGEXP extension for the {M,N} construct where M is zero. See [forum:/forumpost/8694e55a2c29963c|forum post 8694e55a2c29963c] for more information. FossilOrigin-Name: af15bb75306a4b94593b8431a34768b3de3d6689293e85ca02db16bf3e9f39e2 --- diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index 54c505233d..8a3e13115f 100644 --- a/ext/misc/regexp.c +++ b/ext/misc/regexp.c @@ -568,6 +568,7 @@ static const char *re_subcompile_string(ReCompiled *p){ if( m==0 ){ if( n==0 ) return "both m and n are zero in '{m,n}'"; re_insert(p, iPrev, RE_OP_FORK, sz+1); + iPrev++; n--; }else{ for(j=1; j