Patch 8.1.2091

6 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 28, 2019, 9:24:45 AM9/28/19
to vim...@googlegroups.com

Patch 8.1.2091
Problem: Double free when memory allocation fails. (Zu-Ming Jiang)
Solution: Use VIM_CLEAR() instead of vim_free(). (closes #4991)
Files: src/getchar.c


*** ../vim-8.1.2090/src/getchar.c 2019-09-18 21:15:25.409966545 +0200
--- src/getchar.c 2019-09-28 15:21:06.594144273 +0200
***************
*** 1296,1306 ****
if (typebuf.tb_buf == typebuf_init)
internal_error("Free typebuf 1");
else
! vim_free(typebuf.tb_buf);
if (typebuf.tb_noremap == noremapbuf_init)
internal_error("Free typebuf 2");
else
! vim_free(typebuf.tb_noremap);
}

/*
--- 1296,1306 ----
if (typebuf.tb_buf == typebuf_init)
internal_error("Free typebuf 1");
else
! VIM_CLEAR(typebuf.tb_buf);
if (typebuf.tb_noremap == noremapbuf_init)
internal_error("Free typebuf 2");
else
! VIM_CLEAR(typebuf.tb_noremap);
}

/*
*** ../vim-8.1.2090/src/version.c 2019-09-27 23:12:41.846038561 +0200
--- src/version.c 2019-09-28 15:23:04.817540486 +0200
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 2091,
/**/

--
WOMAN: King of the who?
ARTHUR: The Britons.
WOMAN: Who are the Britons?
ARTHUR: Well, we all are. we're all Britons and I am your king.
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages