Module Name: xsrc
Committed By: christos
Date: Sat Sep 5 08:07:53 UTC 2015
Modified Files:
xsrc/external/mit/ctwm/dist: menus.c
Log Message:
CID 1322883: check error return from XFindContext
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/ctwm/dist/menus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/ctwm/dist/menus.c
diff -u xsrc/external/mit/ctwm/dist/menus.c:1.3 xsrc/external/mit/ctwm/dist/menus.c:1.4
--- xsrc/external/mit/ctwm/dist/menus.c:1.3 Sat Sep 5 04:06:25 2015
+++ xsrc/external/mit/ctwm/dist/menus.c Sat Sep 5 04:07:53 2015
@@ -785,7 +785,9 @@ int UpdateMenu(void)
if (ActiveMenu && !ActiveMenu->entered)
continue;
- XFindContext(dpy, ActiveMenu->w, ScreenContext, (XPointer *)&Scr);
+ if (XFindContext(dpy, ActiveMenu->w, ScreenContext, (XPointer *)&Scr)
+ != XCSUCCESS)
+ continue;
if (x < 0 || y < 0 ||
x >= ActiveMenu->width || y >= ActiveMenu->height)