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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909281324.x8SDOc2p007438%40masaka.moolenaar.net.

Raspunde prin e-mail lui