diff -Nru openbox-3.6.1/debian/changelog openbox-3.6.1/debian/changelog --- openbox-3.6.1/debian/changelog 2022-01-30 05:53:39.000000000 -0600 +++ openbox-3.6.1/debian/changelog 2023-03-23 15:47:38.000000000 -0500 @@ -1,3 +1,12 @@ +openbox (3.6.1-10ubuntu1) lunar; urgency=medium + + * Cherry-pick patch from + http://git.openbox.org/?p=mikachu/openbox.git;a=commit;h=d41128e5a1002af41c976c8860f8299cfcd3cd72 + to avoid crashing when switching from a fullscreen window (LP: #2011751) + * Updated copyright file. + + -- Aaron Rainbolt Thu, 23 Mar 2023 15:47:38 -0500 + openbox (3.6.1-10) unstable; urgency=medium [ Debian Janitor ] diff -Nru openbox-3.6.1/debian/control openbox-3.6.1/debian/control --- openbox-3.6.1/debian/control 2022-01-30 05:51:24.000000000 -0600 +++ openbox-3.6.1/debian/control 2023-03-23 15:47:38.000000000 -0500 @@ -1,7 +1,8 @@ Source: openbox Section: x11 Priority: optional -Maintainer: Mateusz Łukasik +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Mateusz Łukasik Build-Depends: debhelper-compat (= 13), gettext, libstartup-notification0-dev, libxrender-dev, pkg-config, libglib2.0-dev, libxml2-dev (>= 2.6.0), perl, libxt-dev, libxinerama-dev, libxrandr-dev, libpango1.0-dev, libx11-dev, diff -Nru openbox-3.6.1/debian/copyright openbox-3.6.1/debian/copyright --- openbox-3.6.1/debian/copyright 2020-12-12 07:39:50.000000000 -0600 +++ openbox-3.6.1/debian/copyright 2023-03-23 15:47:38.000000000 -0500 @@ -59,6 +59,11 @@ Source: http://rmoe.anukis.de/obamenu.html License: GPL-2+ +Files: debian/patches/client_calc_layer_segfault_fix.patch +Copyright: 2023 pldubouilh +Source: http://git.openbox.org/?p=mikachu/openbox.git;a=commit;h=d41128e5a1002af41c976c8860f8299cfcd3cd72 +License: GPL-2+ + License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru openbox-3.6.1/debian/patches/client_calc_layer_segfault_fix.patch openbox-3.6.1/debian/patches/client_calc_layer_segfault_fix.patch --- openbox-3.6.1/debian/patches/client_calc_layer_segfault_fix.patch 1969-12-31 18:00:00.000000000 -0600 +++ openbox-3.6.1/debian/patches/client_calc_layer_segfault_fix.patch 2023-03-23 15:47:38.000000000 -0500 @@ -0,0 +1,49 @@ +Description: Work around invalid pointer shenanigans. + The client_calc_layer function contains code that loops through a linked + list via a pointer into that list, while simultaneously modifying that + list within the loop. When the list is modified, the pointer into the list + points to invalid data, and attempting to move to the next list element + and then dereference it results in a segfault. To avoid this, a copy of the + list is made and looped through while the original list is modified. +Author: pldubouilh +Origin: other +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2011751 +Bug: https://bugzilla.icculus.org/show_bug.cgi?id=6669 +Reviewed-By: Aaron Rainbolt +Last-Update: 2023-03-23 +--- + +--- a/openbox/client.c ++++ b/openbox/client.c +@@ -2702,9 +2702,12 @@ static void client_calc_layer_internal(O + void client_calc_layer(ObClient *self) + { + GList *it; ++ /* the client_calc_layer_internal calls below modify stacking_list, ++ so we have to make a copy to iterate over */ ++ GList *list = g_list_copy(stacking_list); + + /* skip over stuff above fullscreen layer */ +- for (it = stacking_list; it; it = g_list_next(it)) ++ for (it = list; it; it = g_list_next(it)) + if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break; + + /* find the windows in the fullscreen layer, and mark them not-visited */ +@@ -2717,7 +2720,7 @@ void client_calc_layer(ObClient *self) + client_calc_layer_internal(self); + + /* skip over stuff above fullscreen layer */ +- for (it = stacking_list; it; it = g_list_next(it)) ++ for (it = list; it; it = g_list_next(it)) + if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break; + + /* now recalc any windows in the fullscreen layer which have not +@@ -2728,6 +2731,8 @@ void client_calc_layer(ObClient *self) + !WINDOW_AS_CLIENT(it->data)->visited) + client_calc_layer_internal(it->data); + } ++ ++ g_list_free(it); + } + + gboolean client_should_show(ObClient *self) diff -Nru openbox-3.6.1/debian/patches/series openbox-3.6.1/debian/patches/series --- openbox-3.6.1/debian/patches/series 2022-01-30 05:48:46.000000000 -0600 +++ openbox-3.6.1/debian/patches/series 2023-03-19 20:42:17.000000000 -0500 @@ -26,3 +26,4 @@ Add-class-hint-to-focus-cycle-popup.patch Fix-collision-between-iterator-and-throw-away-argume.patch 974180.patch +client_calc_layer_segfault_fix.patch