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: Crash when using skk.vim plugin.
12 Solution: Get length of expression evaluation result only after checking for
13 NULL. (Noriaki Yagi, Dominique Pelle)
17 *** ../vim-7.3.038/src/ex_getln.c 2010-09-29 15:50:14.000000000 +0200
18 --- src/ex_getln.c 2010-10-27 12:42:00.000000000 +0200
23 restore_cmdline(&save_ccline);
24 - len = (int)STRLEN(p);
26 ! if (p != NULL && realloc_cmdbuff(len + 1) == OK)
28 ! ccline.cmdlen = len;
29 ! STRCPY(ccline.cmdbuff, p);
32 ! /* Restore the cursor or use the position set with
33 ! * set_cmdline_pos(). */
34 ! if (new_cmdpos > ccline.cmdlen)
35 ! ccline.cmdpos = ccline.cmdlen;
37 ! ccline.cmdpos = new_cmdpos;
39 ! KeyTyped = FALSE; /* Don't do p_wc completion. */
41 ! goto cmdline_changed;
48 restore_cmdline(&save_ccline);
52 ! len = (int)STRLEN(p);
53 ! if (realloc_cmdbuff(len + 1) == OK)
55 ! ccline.cmdlen = len;
56 ! STRCPY(ccline.cmdbuff, p);
59 ! /* Restore the cursor or use the position set with
60 ! * set_cmdline_pos(). */
61 ! if (new_cmdpos > ccline.cmdlen)
62 ! ccline.cmdpos = ccline.cmdlen;
64 ! ccline.cmdpos = new_cmdpos;
66 ! KeyTyped = FALSE; /* Don't do p_wc completion. */
68 ! goto cmdline_changed;
73 *** ../vim-7.3.038/src/version.c 2010-10-27 12:33:12.000000000 +0200
74 --- src/version.c 2010-10-27 12:43:40.000000000 +0200
78 { /* Add new patch number below this line */
84 "Hegel was right when he said that we learn from history that man can
85 never learn anything from history." (George Bernard Shaw)
87 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
88 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
89 \\\ download, build and distribute -- http://www.A-A-P.org ///
90 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///