Mercurial > vim
comparison src/regexp_bt.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 | 72524e906658 |
children | 08f4dc2ba716 |
comparison
equal
deleted
inserted
replaced
18944:e90fc3f5a0ae | 18945:c62d63d2b9f0 |
---|---|
4566 { | 4566 { |
4567 int i; | 4567 int i; |
4568 | 4568 |
4569 cleanup_zsubexpr(); | 4569 cleanup_zsubexpr(); |
4570 re_extmatch_out = make_extmatch(); | 4570 re_extmatch_out = make_extmatch(); |
4571 if (re_extmatch_out == NULL) | |
4572 return 0; | |
4571 for (i = 0; i < NSUBEXP; i++) | 4573 for (i = 0; i < NSUBEXP; i++) |
4572 { | 4574 { |
4573 if (REG_MULTI) | 4575 if (REG_MULTI) |
4574 { | 4576 { |
4575 // Only accept single line matches. | 4577 // Only accept single line matches. |