]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1292 v7.3.1292
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 12:01:56 +0000 (14:01 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 12:01:56 +0000 (14:01 +0200)
Problem:    Possibly using invalid pointer when searcing for window. (Raichoo)
Solution:   Use "firstwin" instead of "tp_firstwin" for current tab.

src/version.c
src/window.c

index 8c49821877d45c04dc682325fcf3370a2c299222..d661c643639ba0242f3712175e38788bd377d1b3 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1292,
 /**/
     1291,
 /**/
index 54ab200807cbde877c3b1266d518087099643c01..2435952e1574bb29918cf1e03111ef073891708c 100644 (file)
@@ -4077,7 +4077,8 @@ win_find_tabpage(win)
     tabpage_T  *tp;
 
     for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
-       for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
+       for (wp = (tp == curtab ? firstwin : tp->tp_firstwin);
+                                                 wp != NULL; wp = wp->w_next)
            if (wp == win)
                return tp;
     return NULL;