1
0
forked from aniani/vim

patch 8.0.0134

Problem:    Null pointer access reported by UBsan.
Solution:   Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar 2016-12-14 21:42:00 +01:00
parent fe38b494ff
commit c4bfedabe0
2 changed files with 4 additions and 1 deletions

View 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;

View File

@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
134,
/**/
133,
/**/