mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
server: Fail to bind object when requested version is 0
0 is not a valid version number for registry bind requests, so let's check for it in registry_bind. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
5ac34a1012
commit
0d56e380f6
1 changed files with 5 additions and 0 deletions
|
|
@ -730,6 +730,11 @@ registry_bind(struct wl_client *client,
|
|||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid global %s (%d)", interface, name);
|
||||
else if (version == 0)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"invalid version for global %s (%d): 0 is not a valid version",
|
||||
interface, name);
|
||||
else if (global->version < version)
|
||||
wl_resource_post_error(resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue