diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-30 11:08:49 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-30 11:38:21 +0900 |
commit | 1940c6bbd9c0a8867e40a36f27b69c7069213cf0 (patch) | |
tree | 4e10972131bcbb9bfb51e34fad05dd75f2d39d3f | |
parent | 4cc441248121493350eb50277d2815ec31e9ea59 (diff) |
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
-rw-r--r-- | backend/wayland/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
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? |