diff -Nru imv-4.3.0/debian/changelog imv-4.3.0/debian/changelog --- imv-4.3.0/debian/changelog 2022-02-09 04:35:05.000000000 +0000 +++ imv-4.3.0/debian/changelog 2022-04-07 07:15:36.000000000 +0000 @@ -1,8 +1,10 @@ -imv (4.3.0-1build1) jammy; urgency=medium +imv (4.3.0-1.1) unstable; urgency=medium - * No-change rebuild for icu soname change. + * Non-maintainer upload. + * d/patches: add 0002-Fix-segfault-with-latest-wlroots.patch to fix + segfault with newer wlroots (Closes: #1006543) - -- Matthias Klose Wed, 09 Feb 2022 05:35:05 +0100 + -- Gard Spreemann Thu, 07 Apr 2022 09:15:36 +0200 imv (4.3.0-1) unstable; urgency=medium diff -Nru imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch --- imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch 1970-01-01 00:00:00.000000000 +0000 +++ imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch 2022-04-06 11:19:10.000000000 +0000 @@ -0,0 +1,45 @@ +From: Gard Spreemann +Date: Wed, 6 Apr 2022 13:18:10 +0200 +Subject: Fix segfault with latest wlroots + +For fixing #1006543. + +Based on upstream commit 00d07c0a103fbf685473c73ef676f73c52fd371a. +--- + src/wl_window.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/wl_window.c b/src/wl_window.c +index d7025d2..5efa42f 100644 +--- a/src/wl_window.c ++++ b/src/wl_window.c +@@ -18,6 +18,8 @@ + #include + #include "xdg-shell-client-protocol.h" + ++#define imv_min(a,b) ((a) > (b) ? (b) : (a)) ++ + struct imv_window { + struct wl_display *wl_display; + struct wl_registry *wl_registry; +@@ -502,16 +504,20 @@ static void on_global(void *data, struct wl_registry *registry, uint32_t id, + struct imv_window *window = data; + + if (!strcmp(interface, "wl_compositor")) { ++ version = imv_min(version, 4); + window->wl_compositor = + wl_registry_bind(registry, id, &wl_compositor_interface, version); + } else if (!strcmp(interface, "xdg_wm_base")) { ++ version = imv_min(version, 2); + window->wl_xdg = + wl_registry_bind(registry, id, &xdg_wm_base_interface, version); + xdg_wm_base_add_listener(window->wl_xdg, &shell_listener_xdg, window); + } else if (!strcmp(interface, "wl_seat")) { ++ version = imv_min(version, 7); + window->wl_seat = wl_registry_bind(registry, id, &wl_seat_interface, version); + wl_seat_add_listener(window->wl_seat, &seat_listener, window); + } else if (!strcmp(interface, "wl_output")) { ++ version = imv_min(version, 3); + struct output_data *output_data = calloc(1, sizeof *output_data); + output_data->wl_output = wl_registry_bind(registry, id, &wl_output_interface, version); + output_data->pending_scale = 1; diff -Nru imv-4.3.0/debian/patches/series imv-4.3.0/debian/patches/series --- imv-4.3.0/debian/patches/series 2021-10-31 16:53:45.000000000 +0000 +++ imv-4.3.0/debian/patches/series 2022-04-06 11:19:10.000000000 +0000 @@ -1 +1,2 @@ call-imv-from-libexec.patch +0002-Fix-segfault-with-latest-wlroots.patch