commit | 8a0dcf43305586853f452a77fa295b0c8d54b463 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Sep 06 15:14:45 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Sep 06 15:14:45 2020 +0200 |
tree | ccf2c0ebb8744b84c55ca4c199f4d56708b6f7d6 | |
parent | 4140c4f3fff1a441f2837f2f911ab0f0368e412a [diff] [blame] |
patch 8.2.1621: crash when using submatch(0, 1) in substitute() Problem: Crash when using submatch(0, 1) in substitute(). Solution: Increment reference count. (closes #6887)
diff --git a/src/regexp.c b/src/regexp.c index 229f6ef..375731c 100644 --- a/src/regexp.c +++ b/src/regexp.c
@@ -2543,6 +2543,7 @@ list_free(list); return NULL; } + ++list->lv_refcount; return list; } #endif