From a6afff2c4ab177011d4cd59fe5c3a766d2fa053a Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 14 Jan 2012 09:32:54 -0600 Subject: [PATCH] fix potential segfault in win_extents --- compton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compton.c b/compton.c index 0dbebaed..606982b4 100644 --- a/compton.c +++ b/compton.c @@ -855,7 +855,7 @@ win_extents(Display *dpy, win *w) { r.height = w->a.height + w->a.border_width * 2; // check NUM_WINTYPES to prevent segfault - if (w->window_type + if (w->window_type >= 0 && w->window_type < NUM_WINTYPES && win_type_shadow[w->window_type]) { XRectangle sr;