From: Bram Moolenaar Date: Fri, 22 Nov 2019 18:22:08 +0000 (+0100) Subject: patch 8.1.2334: possible NULL pointer dereference in popup_locate() X-Git-Tag: v8.1.2334 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd318115a5ee813cba69aa7fc7f5f42f08f10ee4;p=vim 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 index efcc39598..3b808e2e3 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -2599,7 +2599,7 @@ f_popup_locate(typval_T *argvars, typval_T *rettv) 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 index 903734998..c327f98b4 100644 --- a/src/version.c +++ b/src/version.c @@ -737,6 +737,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2334, /**/ 2333, /**/