# HG changeset patch # User Bram Moolenaar # Date 1574447404 -3600 # Node ID ff4174f1ed3abd3e8b00a0a4c578f230097d8035 # Parent 713c3edb114721562e452f6866ac4301f1a24d99 patch 8.1.2334: possible NULL pointer dereference in popup_locate() Commit: https://github.com/vim/vim/commit/fd318115a5ee813cba69aa7fc7f5f42f08f10ee4 Author: Bram Moolenaar Date: Fri Nov 22 19:22:08 2019 +0100 patch 8.1.2334: possible NULL pointer dereference in popup_locate() Problem: Possible NULL pointer dereference in popup_locate(). (Coverity) Solution: Check for NULL pointer. diff --git a/src/popupwin.c b/src/popupwin.c --- a/src/popupwin.c +++ b/src/popupwin.c @@ -2599,7 +2599,7 @@ f_popup_locate(typval_T *argvars, typval win_T *wp; wp = mouse_find_win(&row, &col, FIND_POPUP); - if (WIN_IS_POPUP(wp)) + if (wp != NULL && WIN_IS_POPUP(wp)) rettv->vval.v_number = wp->w_id; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -738,6 +738,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2334, +/**/ 2333, /**/ 2332,