1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Ruby on Mac OS X 10.7 may crash.
12 Solution: Avoid alloc(0). (Bjorn Winckler)
16 *** ../vim-7.3.266/src/if_ruby.c 2011-01-17 19:53:20.000000000 +0100
17 --- src/if_ruby.c 2011-08-04 18:57:43.000000000 +0200
22 str = rb_obj_as_string(str);
23 ! buff = ALLOCA_N(char, RSTRING_LEN(str));
24 ! strcpy(buff, RSTRING_PTR(str));
25 ! p = strchr(buff, '\n');
34 str = rb_obj_as_string(str);
35 ! if (RSTRING_LEN(str) > 0)
37 ! /* Only do this when the string isn't empty, alloc(0) causes trouble. */
38 ! buff = ALLOCA_N(char, RSTRING_LEN(str));
39 ! strcpy(buff, RSTRING_PTR(str));
40 ! p = strchr(buff, '\n');
51 *** ../vim-7.3.266/src/version.c 2011-07-27 18:25:40.000000000 +0200
52 --- src/version.c 2011-08-04 19:07:45.000000000 +0200
56 { /* Add new patch number below this line */
62 There are 10 kinds of people: Those who understand binary and those who don't.
64 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
65 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
66 \\\ an exciting new programming language -- http://www.Zimbu.org ///
67 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///