[vlc-devel] [PATCH] gestures: fix: allow gesture to be triggered

Zoran Turalija zoran.turalija at gmail.com
Sun Mar 8 16:36:05 CET 2015


On Sun, Mar 08, 2015 at 01:09:10PM +0200, Rémi Denis-Courmont wrote:
> Le vendredi 06 mars 2015, 20:14:21 Zoran Turalija a écrit :
> > ---
> >  modules/control/gestures.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/modules/control/gestures.c b/modules/control/gestures.c
> > index 2b40fc4..e928928 100644
> > --- a/modules/control/gestures.c
> > +++ b/modules/control/gestures.c
> > @@ -410,8 +410,7 @@ static int MovedEvent( vlc_object_t *p_this, char const
> > *psz_var, {
> >              p_sys->i_last_x = newval.coords.x;
> >              p_sys->i_last_y = newval.coords.y;
> > -            if( p_sys->i_num_gestures > 0
> > -             && gesture( p_sys->i_pattern, p_sys->i_num_gestures - 1 )
> > +            if( gesture( p_sys->i_pattern, p_sys->i_num_gestures - 1 )
> 
> I think this is UB.

Yes it is.

I'll send another patch.

-- 
Kind regards,
Zoran Turalija



More information about the vlc-devel mailing list