[PATCH weston 1/3] clipboard: zalloc the clipboard_source

Bryce Harrington bryce at osg.samsung.com
Mon Feb 1 23:51:31 UTC 2016


On Mon, Feb 01, 2016 at 02:01:12PM -0600, Derek Foreman wrote:
> On 01/02/16 01:28 PM, Carlos Garnacho wrote:
> > The wrapped weston_data_source struct has new fields which were left
> > uninitialized, so its access is unreliable.
> > 
> > Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
> 
> Thanks for the quick fix on this.
> 
> Whole series is:
> Reviewed-by: Derek Foreman <derekf at osg.samsung.com
> and
> Tested-by: Derek Foreman <derekf at osg.samsung.com>

And pushed as 4061e2b6, beb7a9f9, 15902bf4

Thanks,
Bryce

> > ---
> >  src/clipboard.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/clipboard.c b/src/clipboard.c
> > index da7dbb6..54a578f 100644
> > --- a/src/clipboard.c
> > +++ b/src/clipboard.c
> > @@ -141,7 +141,7 @@ clipboard_source_create(struct clipboard *clipboard,
> >  	struct clipboard_source *source;
> >  	char **s;
> >  
> > -	source = malloc(sizeof *source);
> > +	source = zalloc(sizeof *source);
> >  	if (source == NULL)
> >  		return NULL;
> >  
> > 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list