From 1940c6bbd9c0a8867e40a36f27b69c7069213cf0 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 30 Jun 2018 11:08:49 +0900 Subject: [PATCH] wayland backend: fix width/height == 0 check We cannot handle just one of the two being NULL later down the road (e.g. divide by zero in matrix projection code), just ignore any such configure request. Found through static analysis --- backend/wayland/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 42b41508..6aa59537 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -220,7 +220,7 @@ static void xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *x struct wlr_wl_output *output = data; assert(output && output->xdg_toplevel == xdg_toplevel); - if (width == 0 && height == 0) { + if (width == 0 || height == 0) { return; } // loop over states for maximized etc?