client: check event opcode in queue_event
authorSimon Ser <simon.ser@intel.com>
Wed, 28 Aug 2019 14:11:21 +0000 (17:11 +0300)
committerPekka Paalanen <pq@iki.fi>
Thu, 5 Sep 2019 11:01:12 +0000 (11:01 +0000)
commita277cc6d5238321a37951bd0a0448bb6ce0e115f
treedbd36d80f07585f90767dbba22ec20c5dfa8ab83
parent152c9ed968124c253f0be25b76c2a083a21af37e
client: check event opcode in queue_event

If the client binds to a global with an interface mismatch, it may receive an
event from the server with an unknown opcode. See [1].

Instead of crashing, print a more useful debug message and close the connection.

[1]: https://gitlab.freedesktop.org/wayland/wayland/issues/113

Signed-off-by: Simon Ser <simon.ser@intel.com>
src/wayland-client.c