From: Kristian Høgsberg Date: Sun, 12 Aug 2012 02:39:12 +0000 (-0400) Subject: shell: Ignore unsolicited pong requests X-Git-Tag: submit/trunk/20120814.155504~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92374e1409516f626092714d454790cfc26dbf91;p=profile%2Fivi%2Fweston.git 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. --- diff --git a/src/shell.c b/src/shell.c index 87e688c..83f0bc8 100644 --- a/src/shell.c +++ b/src/shell.c @@ -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;