mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
server: check global interface on bind
The interface name provided by the client isn't used at all. Check it matches the global's interface name to prevent object interface mismatches between the client and the server. These are especially easy to get when mixing up global names and other IDs in the client. Signed-off-by: Simon Ser <simon.ser@intel.com> Closes: https://gitlab.freedesktop.org/wayland/wayland/issues/113
This commit is contained in:
parent
b69e547fa4
commit
e18e3e195b
1 changed files with 6 additions and 0 deletions
|
|
@ -917,6 +917,12 @@ registry_bind(struct wl_client *client,
|
|||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid global %s (%d)", interface, name);
|
||||
else if (strcmp(global->interface->name, interface) != 0)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid interface for global %u: "
|
||||
"have %s, wanted %s",
|
||||
name, interface, global->interface->name);
|
||||
else if (version == 0)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue