]>
Commit | Line | Data |
---|---|---|
17e7d110 SS |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.039 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.039 | |
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) | |
14 | Files: src/ex_getln.c | |
15 | ||
16 | ||
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 | |
19 | *************** | |
20 | *** 688,711 **** | |
21 | p = get_expr_line(); | |
22 | --textlock; | |
23 | restore_cmdline(&save_ccline); | |
24 | - len = (int)STRLEN(p); | |
25 | ||
26 | ! if (p != NULL && realloc_cmdbuff(len + 1) == OK) | |
27 | { | |
28 | ! ccline.cmdlen = len; | |
29 | ! STRCPY(ccline.cmdbuff, p); | |
30 | ! vim_free(p); | |
31 | ! | |
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; | |
36 | ! else | |
37 | ! ccline.cmdpos = new_cmdpos; | |
38 | ! | |
39 | ! KeyTyped = FALSE; /* Don't do p_wc completion. */ | |
40 | ! redrawcmd(); | |
41 | ! goto cmdline_changed; | |
42 | } | |
43 | } | |
44 | beep_flush(); | |
45 | --- 688,714 ---- | |
46 | p = get_expr_line(); | |
47 | --textlock; | |
48 | restore_cmdline(&save_ccline); | |
49 | ||
50 | ! if (p != NULL) | |
51 | { | |
52 | ! len = (int)STRLEN(p); | |
53 | ! if (realloc_cmdbuff(len + 1) == OK) | |
54 | ! { | |
55 | ! ccline.cmdlen = len; | |
56 | ! STRCPY(ccline.cmdbuff, p); | |
57 | ! vim_free(p); | |
58 | ! | |
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; | |
63 | ! else | |
64 | ! ccline.cmdpos = new_cmdpos; | |
65 | ! | |
66 | ! KeyTyped = FALSE; /* Don't do p_wc completion. */ | |
67 | ! redrawcmd(); | |
68 | ! goto cmdline_changed; | |
69 | ! } | |
70 | } | |
71 | } | |
72 | beep_flush(); | |
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 | |
75 | *************** | |
76 | *** 716,717 **** | |
77 | --- 716,719 ---- | |
78 | { /* Add new patch number below this line */ | |
79 | + /**/ | |
80 | + 39, | |
81 | /**/ | |
82 | ||
83 | -- | |
84 | "Hegel was right when he said that we learn from history that man can | |
85 | never learn anything from history." (George Bernard Shaw) | |
86 | ||
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 /// |