[vlc-devel] [PATCH 1/3] zvbi: Fail probe if vbi-page is incorrect
Thomas Guillem
thomas at gllm.fr
Fri Mar 24 08:23:34 CET 2017
On Thu, Mar 23, 2017, at 17:31, Rémi Denis-Courmont wrote:
> Le torstaina 23. maaliskuuta 2017, 11.31.12 EET Thomas Guillem a écrit :
> > ---
> > modules/codec/zvbi.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
> > index 430a6ba42d..8578f2fca2 100644
> > --- a/modules/codec/zvbi.c
> > +++ b/modules/codec/zvbi.c
> > @@ -208,6 +208,13 @@ static int Open( vlc_object_t *p_this )
> > if( p_dec->fmt_in.i_codec != VLC_CODEC_TELETEXT )
> > return VLC_EGENERIC;
> >
> > + int i_page = var_CreateGetInteger( p_dec, "vbi-page" );
> > + if( i_page < 0 || i_page > 999 )
> > + {
> > + msg_Warn( p_dec, "Invalid vbi-page");
> > + return VLC_EGENERIC;
> > + }
>
> The allowed range should be set in plugin descriptor. If the valid
> somehow
> ends up invalid regarldess, then this patch can still lead to UB.
There is no easy ranges, since we can send key ('r'<<16 for example) via
vbi-page.
It may be easier with a new option: "vbi-key".
>
> So I don´t really see the point, TBH.
>
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list