]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.039 v7.3.039
authorBram Moolenaar <Bram@vim.org>
Wed, 27 Oct 2010 10:58:23 +0000 (12:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 27 Oct 2010 10:58:23 +0000 (12:58 +0200)
Problem:    Crash when using skk.vim plugin.
Solution:   Get length of expression evaluation result only after checking for
            NULL.  (Noriaki Yagi, Dominique Pelle)

src/ex_getln.c
src/version.c

index 6fa5531d01629e1cbf7f3e1afc679d660f7a4312..c3514874f73baef1d3b0a9827b76fb654df13080 100644 (file)
@@ -688,24 +688,27 @@ getcmdline(firstc, count, indent)
                    p = get_expr_line();
                    --textlock;
                    restore_cmdline(&save_ccline);
-                   len = (int)STRLEN(p);
 
-                   if (p != NULL && realloc_cmdbuff(len + 1) == OK)
+                   if (p != NULL)
                    {
-                       ccline.cmdlen = len;
-                       STRCPY(ccline.cmdbuff, p);
-                       vim_free(p);
-
-                       /* Restore the cursor or use the position set with
-                        * set_cmdline_pos(). */
-                       if (new_cmdpos > ccline.cmdlen)
-                           ccline.cmdpos = ccline.cmdlen;
-                       else
-                           ccline.cmdpos = new_cmdpos;
-
-                       KeyTyped = FALSE;       /* Don't do p_wc completion. */
-                       redrawcmd();
-                       goto cmdline_changed;
+                       len = (int)STRLEN(p);
+                       if (realloc_cmdbuff(len + 1) == OK)
+                       {
+                           ccline.cmdlen = len;
+                           STRCPY(ccline.cmdbuff, p);
+                           vim_free(p);
+
+                           /* Restore the cursor or use the position set with
+                            * set_cmdline_pos(). */
+                           if (new_cmdpos > ccline.cmdlen)
+                               ccline.cmdpos = ccline.cmdlen;
+                           else
+                               ccline.cmdpos = new_cmdpos;
+
+                           KeyTyped = FALSE;   /* Don't do p_wc completion. */
+                           redrawcmd();
+                           goto cmdline_changed;
+                       }
                    }
                }
                beep_flush();
index d4244e1c02d46c3cac4b4dbac3a6e32025b0bd52..b334cdb1605389dd795a19da04330eb94ceaebf4 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    39,
 /**/
     38,
 /**/