]> granicus.if.org Git - vim/commitdiff
patch 8.0.0134 v8.0.0134
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Dec 2016 20:42:00 +0000 (21:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Dec 2016 20:42:00 +0000 (21:42 +0100)
Problem:    Null pointer access reported by UBsan.
Solution:   Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)

src/ex_cmds.c
src/version.c

index 206ead18527c928bed6f1cbf5de40607e7cf076e..484a22c74a33a4ea4e67b1624334f9a621f5c946 100644 (file)
@@ -3967,7 +3967,8 @@ do_ecmd(
                     * <VN> We could instead free the synblock
                     * and re-attach to buffer, perhaps.
                     */
-                   if (curwin->w_s == &(curwin->w_buffer->b_s))
+                   if (curwin->w_buffer != NULL
+                           && curwin->w_s == &(curwin->w_buffer->b_s))
                        curwin->w_s = &(buf->b_s);
 #endif
                    curwin->w_buffer = buf;
index 2e3cb057e979349bcf0fc3e7ec6ed0d4a8d61599..723544ff4262b1f1e2d96aae46b79f5b3c8f96cf 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    134,
 /**/
     133,
 /**/