[vlc-devel] [PATCH] demux: ts: Fix potential use of uninitialized variable

Tristan Matthews tmatth at videolan.org
Tue Dec 15 17:47:38 CET 2020


Hi,

On Tue, Dec 15, 2020 at 11:39 AM Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
>
> ---
>  modules/demux/mpeg/ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
> index 9c7c4625c6..b294d06d0e 100644
> --- a/modules/demux/mpeg/ts.c
> +++ b/modules/demux/mpeg/ts.c
> @@ -450,7 +450,7 @@ static int Open( vlc_object_t *p_this )
>      if( psz_string && *psz_string )
>      {
>          int i_res;
> -        char* psz_csa2;
> +        char* psz_csa2 = NULL;
>
>          p_sys->csa = csa_New();
>
> --
> 2.29.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

LGTM, otherwise setting it in the else block of if ( p_sys->csa ) (as
this is where i_res is being initialized) would work too.


More information about the vlc-devel mailing list