Mercurial > vim
comparison src/regexp.c @ 22143:3ec9e302ec94 v8.2.1621
patch 8.2.1621: crash when using submatch(0, 1) in substitute()
Commit: https://github.com/vim/vim/commit/8a0dcf43305586853f452a77fa295b0c8d54b463
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 6 15:14:45 2020 +0200
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 https://github.com/vim/vim/issues/6887)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Sep 2020 15:15:04 +0200 |
parents | 3af71cbcfdbe |
children | 01cab6232a9a |
comparison
equal
deleted
inserted
replaced
22142:572e3d7849e5 | 22143:3ec9e302ec94 |
---|---|
2541 if (error) | 2541 if (error) |
2542 { | 2542 { |
2543 list_free(list); | 2543 list_free(list); |
2544 return NULL; | 2544 return NULL; |
2545 } | 2545 } |
2546 ++list->lv_refcount; | |
2546 return list; | 2547 return list; |
2547 } | 2548 } |
2548 #endif | 2549 #endif |
2549 | 2550 |
2550 /* | 2551 /* |