Mercurial > vim
comparison src/regexp_nfa.c @ 18945:c62d63d2b9f0 v8.2.0033
patch 8.2.0033: crash when make_extmatch() runs out of memory
Commit: https://github.com/vim/vim/commit/7c77b3496710f1be3232cfdc7f6812347fbd914a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 22 19:40:40 2019 +0100
patch 8.2.0033: crash when make_extmatch() runs out of memory
Problem: Crash when make_extmatch() runs out of memory.
Solution: Check for NULL. (Dominique Pelle, closs https://github.com/vim/vim/issues/5392)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Dec 2019 19:45:03 +0100 |
parents | d34ec6fe207d |
children | 08f4dc2ba716 |
comparison
equal
deleted
inserted
replaced
18944:e90fc3f5a0ae | 18945:c62d63d2b9f0 |
---|---|
7068 | 7068 |
7069 if (prog->reghasz == REX_SET) | 7069 if (prog->reghasz == REX_SET) |
7070 { | 7070 { |
7071 cleanup_zsubexpr(); | 7071 cleanup_zsubexpr(); |
7072 re_extmatch_out = make_extmatch(); | 7072 re_extmatch_out = make_extmatch(); |
7073 if (re_extmatch_out == NULL) | |
7074 return 0; | |
7073 // Loop over \z1, \z2, etc. There is no \z0. | 7075 // Loop over \z1, \z2, etc. There is no \z0. |
7074 for (i = 1; i < subs.synt.in_use; i++) | 7076 for (i = 1; i < subs.synt.in_use; i++) |
7075 { | 7077 { |
7076 if (REG_MULTI) | 7078 if (REG_MULTI) |
7077 { | 7079 { |