[vlc-devel] [PATCH] opus: avoid NULL pointer dereference
Rafaël Carré
funman at videolan.org
Wed Dec 4 13:23:36 CET 2013
Hi,
Le 04/12/2013 01:27, Tristan Matthews a écrit :
> ---
> modules/codec/opus.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/modules/codec/opus.c b/modules/codec/opus.c
> index de6e3d0..b739fc5 100644
> --- a/modules/codec/opus.c
> +++ b/modules/codec/opus.c
> @@ -360,6 +360,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
>
> *pp_block = NULL; /* To avoid being fed the same packet again */
>
> + if( p_block )
if (!p_block)
return NULL;
?
> {
I think the block is not needed also
> block_t *p_aout_buffer = DecodePacket( p_dec, p_oggpacket,
> p_block->i_nb_samples,
> @@ -368,6 +369,10 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
> block_Release( p_block );
> return p_aout_buffer;
> }
> + else
> + {
> + return NULL;
> + }
> }
>
> /*****************************************************************************
>
More information about the vlc-devel
mailing list