Patch 8.2.0033
Problem: Crash when make_extmatch() runs out of memory.
Solution: Check for NULL. (Dominique Pelle, closs #5392)
Files: src/regexp_bt.c, src/regexp_nfa.c
*** ../vim-8.2.0032/src/regexp_bt.c 2019-09-08 17:19:06.000000000 +0200
--- src/regexp_bt.c 2019-12-22 19:38:10.490383737 +0100
***************
*** 4568,4573 ****
--- 4568,4575 ----
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
+ if (re_extmatch_out == NULL)
+ return 0;
for (i = 0; i < NSUBEXP; i++)
{
if (REG_MULTI)
*** ../vim-8.2.0032/src/regexp_nfa.c 2019-12-05 21:01:38.000000000 +0100
--- src/regexp_nfa.c 2019-12-22 19:38:56.306300736 +0100
***************
*** 7070,7075 ****
--- 7070,7077 ----
{
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
+ if (re_extmatch_out == NULL)
+ return 0;
// Loop over \z1, \z2, etc. There is no \z0.
for (i = 1; i < subs.synt.in_use; i++)
{
*** ../vim-8.2.0032/src/version.c 2019-12-22 18:28:48.252481062 +0100
--- src/version.c 2019-12-22 19:40:01.034174291 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 33,
/**/
--
PRINCE: He's come to rescue me, father.
LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201912221841.xBMIfASE011582%40masaka.moolenaar.net.