# HG changeset patch # User Christian Brabandt # Date 1481748304 -3600 # Node ID 712acb0ad6a895fa1be7f911077cb14a21d37098 # Parent 2d41465fea16bbb9d85286162fb7548617dbfb17 commit https://github.com/vim/vim/commit/c4bfedabe057c05f09a455a5851089e177fa9c00 Author: Bram Moolenaar Date: Wed Dec 14 21:42:00 2016 +0100 patch 8.0.0134 Problem: Null pointer access reported by UBsan. Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan) diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3967,7 +3967,8 @@ do_ecmd( * 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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 134, +/**/ 133, /**/ 132,