ignore malformed ConfigureNotify with width or height <= 0
This could crash dwm.
cc repro.c -o repro -lX11; ./repro
int
main(void)
{
Display *d;
int screen;
Window root;
d = XOpenDisplay(NULL);
if (!d) {
fprintf(stderr, "XOpenDisplay failed\n");
return 1;
}
screen = DefaultScreen(d);
root = RootWindow(d, screen);
XConfigureEvent ce = {0};
ce.type = ConfigureNotify;
ce.display = d;
ce.event = root;
ce.window = root;
ce.width = 0;
ce.height = 0;
XSendEvent(d, root, False, StructureNotifyMask, (XEvent *)&ce);
XFlush(d);
XCloseDisplay(d);
return 0;
}
This commit is contained in:
1 parent
7283c8c0ac
commit
3fdf0241fc
1 file changed
+3
Reference in new issue
Block a user