comparison src/ex_cmds.c @ 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 59d01e335858
children 01a5f64a7a20
comparison
equal deleted inserted replaced
10481:2d41465fea16 10482:712acb0ad6a8
3965 #ifdef FEAT_SYN_HL 3965 #ifdef FEAT_SYN_HL
3966 /* 3966 /*
3967 * <VN> We could instead free the synblock 3967 * <VN> We could instead free the synblock
3968 * and re-attach to buffer, perhaps. 3968 * and re-attach to buffer, perhaps.
3969 */ 3969 */
3970 if (curwin->w_s == &(curwin->w_buffer->b_s)) 3970 if (curwin->w_buffer != NULL
3971 && curwin->w_s == &(curwin->w_buffer->b_s))
3971 curwin->w_s = &(buf->b_s); 3972 curwin->w_s = &(buf->b_s);
3972 #endif 3973 #endif
3973 curwin->w_buffer = buf; 3974 curwin->w_buffer = buf;
3974 curbuf = buf; 3975 curbuf = buf;
3975 ++curbuf->b_nwindows; 3976 ++curbuf->b_nwindows;