commit | 7c77b3496710f1be3232cfdc7f6812347fbd914a | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Dec 22 19:40:40 2019 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Dec 22 19:40:40 2019 +0100 |
tree | 01d299dccb0ad0645eb1a01fa07d1c49a01136cf | |
parent | 7c2a2f869b0f5a3e36f5e7d83923a264426e434c [diff] [blame] |
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 #5392)
diff --git a/src/regexp_bt.c b/src/regexp_bt.c index b71b862..78be2b5 100644 --- a/src/regexp_bt.c +++ b/src/regexp_bt.c
@@ -4568,6 +4568,8 @@ cleanup_zsubexpr(); re_extmatch_out = make_extmatch(); + if (re_extmatch_out == NULL) + return 0; for (i = 0; i < NSUBEXP; i++) { if (REG_MULTI)