diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-29 22:28:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-29 22:28:46 +0100 |
commit | a8bfa1727a370d659dc0ccc3f0fd1763b10b5457 (patch) | |
tree | 17834c1ce84410330af2cae7feecfb589fd5880a /src/regexp.c | |
parent | 1ea88a3e12e5f6afc5353cd0d6e6d4f4a89ced94 (diff) |
patch 8.1.0661: clipboard regexp might be used recursivelyv8.1.0661
Problem: Clipboard regexp might be used recursively.
Solution: Check for recursive use and bail out.
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/regexp.c b/src/regexp.c index 011ee2d759..e055dd3623 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -8210,6 +8210,15 @@ report_re_switch(char_u *pat) #endif /* + * Return whether "prog" is currently being executed. + */ + int +regprog_in_use(regprog_T *prog) +{ + return prog->re_in_use; +} + +/* * Match a regexp against a string. * "rmp->regprog" is a compiled regexp as returned by vim_regcomp(). * Note: "rmp->regprog" may be freed and changed. |