[vlc-devel] [PATCH] avi: Fix potential leak
Tristan Matthews
tmatth at videolan.org
Thu Jun 11 16:18:16 CEST 2020
Hi,
On Thu, Jun 11, 2020 at 10:16 AM Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
>
> When AVI_IndexLoad gets invoked multiple time on the same file, we end
> up overwriting the previous index table.
> ---
> modules/demux/avi/avi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
> index 38c8cb61db..34bd228681 100644
> --- a/modules/demux/avi/avi.c
> +++ b/modules/demux/avi/avi.c
> @@ -2549,12 +2549,14 @@ static void AVI_IndexLoad( demux_t *p_demux )
> if( p_idx_indx[i].i_size > p_idx_idx1[i].i_size )
> {
> msg_Dbg( p_demux, "selected ODML index for stream[%u]", i );
> + free(p_sys->track[i]->idx.p_entry);
> p_sys->track[i]->idx = p_idx_indx[i];
> avi_index_Clean( &p_idx_idx1[i] );
> }
> else
> {
> msg_Dbg( p_demux, "selected standard index for stream[%u]", i );
> + free(p_sys->track[i]->idx.p_entry);
> p_sys->track[i]->idx = p_idx_idx1[i];
> avi_index_Clean( &p_idx_indx[i] );
> }
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
LGTM.
Best,
-t
More information about the vlc-devel
mailing list