Mercurial > vim
changeset 10482:712acb0ad6a8 v8.0.0134
commit https://github.com/vim/vim/commit/c4bfedabe057c05f09a455a5851089e177fa9c00
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 14 Dec 2016 21:45:04 +0100 |
parents | 2d41465fea16 |
children | b6ea664a77ad |
files | src/ex_cmds.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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;