Permalink
Browse files

patch 8.0.0134

Problem:    Null pointer access reported by UBsan.
Solution:   Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)
  • Loading branch information...
1 parent fe38b49 commit c4bfedabe057c05f09a455a5851089e177fa9c00 @brammool brammool committed Dec 14, 2016
Showing with 4 additions and 1 deletion.
  1. +2 −1 src/ex_cmds.c
  2. +2 −0 src/version.c
View
@@ -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;
View
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 134,
+/**/
133,
/**/
132,

0 comments on commit c4bfeda

Please sign in to comment.