From 0996407e3d736ea76f58e7a368b73964bb1ce1de Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 6 Nov 2026 08:10:02 +0100 Subject: [PATCH] fix integer underflow in tile() When clients don't fit, my or ty can exceed m->w.height, and since they were unsigned, m->w.height - my wrapped around to huge heights, hanging dwl. With signed ints the height can become negative instead, which applybounds() raises to the minimum size. Fixes: https://codeberg.org/dwl/dwl/issues/1254 --- dwl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 6f971c6..acb1b05 100644 --- a/dwl.c +++ b/dwl.c @@ -3054,8 +3054,7 @@ tagmon(const Arg *arg) void tile(Monitor *m) { - unsigned int mw, my, ty; - int i, n = 0; + int i, n = 0, mw, my, ty; Client *c; wl_list_for_each(c, &clients, link)