[vlc-devel] [PATCH 1/3] zvbi: Fail probe if vbi-page is incorrect
Rémi Denis-Courmont
remi at remlab.net
Thu Mar 23 17:31:53 CET 2017
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.
So I don´t really see the point, TBH.
--
雷米‧德尼-库尔蒙
https://www.remlab.net/
More information about the vlc-devel
mailing list