To: vim_dev@googlegroups.com Subject: Patch 8.0.0134 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0134 Problem: Null pointer access reported by UBsan. Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan) Files: src/ex_cmds.c *** ../vim-8.0.0133/src/ex_cmds.c 2016-11-10 18:16:30.077477227 +0100 --- src/ex_cmds.c 2016-12-14 21:40:47.757907072 +0100 *************** *** 3967,3973 **** * We could instead free the synblock * and re-attach to buffer, perhaps. */ ! if (curwin->w_s == &(curwin->w_buffer->b_s)) curwin->w_s = &(buf->b_s); #endif curwin->w_buffer = buf; --- 3967,3974 ---- * We could instead free the synblock * and re-attach to buffer, perhaps. */ ! if (curwin->w_buffer != NULL ! && curwin->w_s == &(curwin->w_buffer->b_s)) curwin->w_s = &(buf->b_s); #endif curwin->w_buffer = buf; *** ../vim-8.0.0133/src/version.c 2016-12-11 21:34:18.156065286 +0100 --- src/version.c 2016-12-14 21:40:08.170191045 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 134, /**/ -- hundred-and-one symptoms of being an internet addict: 117. You are more comfortable typing in html. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///