To: vim_dev@googlegroups.com Subject: Patch 8.1.1950 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1950 Problem: Using NULL pointer after an out-of-memory. Solution: Check for NULL pointer. (Dominique Pelle, closes #4881) Files: src/syntax.c *** ../vim-8.1.1949/src/syntax.c 2019-08-18 22:25:54.665447991 +0200 --- src/syntax.c 2019-08-31 15:27:26.322037926 +0200 *************** *** 5222,5228 **** for (item = ITEM_START; item <= ITEM_END; ++item) for (ppp = pat_ptrs[item]; ppp != NULL; ppp = ppp_next) { ! if (!success) { vim_regfree(ppp->pp_synp->sp_prog); vim_free(ppp->pp_synp->sp_pattern); --- 5222,5228 ---- for (item = ITEM_START; item <= ITEM_END; ++item) for (ppp = pat_ptrs[item]; ppp != NULL; ppp = ppp_next) { ! if (!success && ppp->pp_synp != NULL) { vim_regfree(ppp->pp_synp->sp_prog); vim_free(ppp->pp_synp->sp_pattern); *** ../vim-8.1.1949/src/version.c 2019-08-30 22:07:55.950547106 +0200 --- src/version.c 2019-08-31 15:25:43.146884634 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1950, /**/ -- We are the Borg of GNU GPL. We will assimilate your source code. Resistance is futile. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///