0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2020-09-06 15:14:45 +02:00
parent 4140c4f3ff
commit 8a0dcf4330
3 changed files with 9 additions and 0 deletions

View File

@@ -2543,6 +2543,7 @@ reg_submatch_list(int no)
list_free(list);
return NULL;
}
++list->lv_refcount;
return list;
}
#endif