diff --git a/modules/xwindow.c b/modules/xwindow.c index 138a748..8aa2b37 100644 --- a/modules/xwindow.c +++ b/modules/xwindow.c @@ -57,6 +57,11 @@ update_active_window(struct private *m) return; } + if (xcb_get_property_value_length(r) != sizeof(m->active_win)) { + free(r); + return; + } + assert(sizeof(m->active_win) == xcb_get_property_value_length(r)); memcpy(&m->active_win, xcb_get_property_value(r), sizeof(m->active_win)); free(r);