mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
Fix UAF when granting an output lease
Wlroots now destroys the wlr_output when granting a lease. So we can't iterate through the outputs in the request after granting the lease. This is also not necessary anymore because they are already destroyed and thus removed from the layout.
This commit is contained in:
parent
d5e93dcfef
commit
4699d446cb
3 changed files with 2 additions and 19 deletions
16
src/server.c
16
src/server.c
|
|
@ -183,22 +183,6 @@ handle_drm_lease_request(struct wl_listener *listener, void *data)
|
|||
wlr_drm_lease_request_v1_reject(req);
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < req->n_connectors; ++i) {
|
||||
struct output *output = req->connectors[i]->output->data;
|
||||
if (!output) {
|
||||
continue;
|
||||
}
|
||||
|
||||
wlr_output_state_set_enabled(&output->pending, false);
|
||||
output_state_commit(output);
|
||||
|
||||
wlr_output_layout_remove(output->server->output_layout,
|
||||
output->wlr_output);
|
||||
output->scene_output = NULL;
|
||||
|
||||
output->leased = true;
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue