On Tue, 16 Feb 2016 22:08:50 -0800
Bryce Harrington <[email protected]> wrote:

> On Fri, Jan 15, 2016 at 10:06:48AM -0600, Derek Foreman wrote:
> > We shouldn't ever create a resource with version less than 1 or
> > greater than the interface version.
> > 
> > Reviewed-by: Marek Chalupa <[email protected]>
> > Signed-off-by: Derek Foreman <[email protected]>
> > ---
> > Changes since v1:
> > Fix silly typo - [0, %d] is now [1, %d]  
> 
> Reviewed-by: Bryce Harrington <[email protected]>
> 
> And pushed:
> To ssh://git.freedesktop.org/git/wayland/wayland
>    6801d2d..88ff135  master -> master
> 
> 
> >  src/wayland-server.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/src/wayland-server.c b/src/wayland-server.c
> > index 3a7d79d..08864eb 100644
> > --- a/src/wayland-server.c
> > +++ b/src/wayland-server.c
> > @@ -1349,6 +1349,13 @@ wl_resource_create(struct wl_client *client,
> >  {
> >     struct wl_resource *resource;
> >  
> > +   if (version < 1 || version > interface->version) {
> > +           wl_log("wl_resource_create: invalid resource version %d "
> > +                  "for interface '%s' - must be in range [1, %d]\n",
> > +                  version, interface->name, interface->version);
> > +           return NULL;
> > +   }
> > +
> >     resource = malloc(sizeof *resource);
> >     if (resource == NULL)
> >             return NULL;
> > -- 
> > 2.7.0.rc3

Hi,

I'm notifying the list that this patch got rightly reverted:
https://cgit.freedesktop.org/wayland/wayland/commit/?id=3a2553ff013a3661ec044917ccde4a74fe152dc9

However, I don't think creating a wl_resource with version < 1 is legal
anyway, so that could come back.


Thanks,
pq

Attachment: pgpAQjDYORlmT.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to