shell: Ignore unsolicited pong requests
If a client sends a pong message out of the blue, we deref ping_timer which is NULL and then crash. Unsolicited pong requests indicate that something is wrong on the client, but the compositor should survide that.
This commit is contained in:
parent
cd8cdccdd3
commit
92374e1409
@ -1155,6 +1155,10 @@ shell_surface_pong(struct wl_client *client, struct wl_resource *resource,
|
||||
struct wl_pointer *pointer;
|
||||
int was_unresponsive;
|
||||
|
||||
if (shsurf->ping_timer == NULL)
|
||||
/* Just ignore unsolicited pong. */
|
||||
return;
|
||||
|
||||
if (shsurf->ping_timer->serial == serial) {
|
||||
was_unresponsive = shsurf->unresponsive;
|
||||
shsurf->unresponsive = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user