diff options
author | drh <> | 2022-07-18 13:10:53 +0000 |
---|---|---|
committer | drh <> | 2022-07-18 13:10:53 +0000 |
commit | 18934137ddfd765025e73b2eb1a1bb83ee5fc03b (patch) | |
tree | b8d5e122e3b659035cce670d9f50361b9977a49f /ext/misc/regexp.c | |
parent | 67a0bf383f00d4f25d9ca27864caabf2a0f572b2 (diff) | |
download | sqlite-18934137ddfd765025e73b2eb1a1bb83ee5fc03b.tar.gz sqlite-18934137ddfd765025e73b2eb1a1bb83ee5fc03b.zip |
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
Diffstat (limited to 'ext/misc/regexp.c')
-rw-r--r-- | ext/misc/regexp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index 54c505233..8a3e13115 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<m; j++) re_copy(p, iPrev, sz); |