wlroots/util
Steven Newbury ad06c12c89 util: Fix infinite loop in recursive function
When testing Xwayland multi-HiDPI support with Wine + SimCity4
I encountered a 100% CPU lockup from sway.  This turned out to be
triggering a bug in the wlroots pointer contraint code.

region_confine() contains multiple recursive calls where arguments
are modified and resubmitted to the function.  One of the calls
is however made using the original arguments, if/when this triggers
it results in the same codepath being followed each loop so the
condition always applies.

It makes much more sense if this was intended to apply the clamped
values x,y instead of the original x1,y1, and indeed this fixes the
infinite loop and results in correct behaviour.
2022-05-24 20:39:32 +00:00
..
addon.c util/addon: avoid calling finish() twice 2022-05-23 11:11:38 +00:00
array.c util/array: add array_remove_at 2021-07-01 10:35:39 -04:00
box.c util/box: introduce wlr_fbox_empty 2021-09-22 10:45:39 -06:00
global.c util/global: remove wl_display arg from wlr_global_destroy_safe 2021-12-14 13:13:50 +00:00
log.c util/time: move timespec_sub to time utilities 2020-06-06 00:09:19 +02:00
meson.build util: add wlr_addon 2021-08-10 19:15:48 +02:00
region.c util: Fix infinite loop in recursive function 2022-05-24 20:39:32 +00:00
shm.c util/shm: clear mode permission bits in allocate_shm_file_pair 2022-05-12 19:58:50 +02:00
signal.c Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
time.c util/time: make NSEC_PER_SEC static 2021-07-28 09:01:59 +02:00
token.c util/token: don't leak /dev/urandom fd to children 2021-11-14 12:30:03 +01:00