Patch 8.0.1047
Problem:    Buffer overflow in Ruby.
Solution:   Allocate one more byte. (Dominique Pelle)
Files:      src/if_ruby.c


*** ../vim-8.0.1046/src/if_ruby.c       2017-01-29 23:11:21.172512839 +0100
--- src/if_ruby.c       2017-09-03 15:15:04.459997942 +0200
***************
*** 984,990 ****
      if (RSTRING_LEN(str) > 0)
      {
        /* Only do this when the string isn't empty, alloc(0) causes trouble. */
!       buff = ALLOCA_N(char, RSTRING_LEN(str));
        strcpy(buff, RSTRING_PTR(str));
        p = strchr(buff, '\n');
        if (p) *p = '\0';
--- 984,990 ----
      if (RSTRING_LEN(str) > 0)
      {
        /* Only do this when the string isn't empty, alloc(0) causes trouble. */
!       buff = ALLOCA_N(char, RSTRING_LEN(str) + 1);
        strcpy(buff, RSTRING_PTR(str));
        p = strchr(buff, '\n');
        if (p) *p = '\0';
*** ../vim-8.0.1046/src/version.c       2017-09-03 15:04:16.684172761 +0200
--- src/version.c       2017-09-03 15:15:00.828021326 +0200
***************
*** 771,772 ****
--- 771,774 ----
  {   /* Add new patch number below this line */
+ /**/
+     1047,
  /**/

-- 
I'm trying to be an optimist, but I don't think it'll work.

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui