Commit 0a94892c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

speek: fix potential NULL dereference

(cherry picked from commit 5dae442d8112968fc6ecb54b140d547f09ec05cd)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e4c7e1db
......@@ -335,11 +335,13 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( !pp_block ) return NULL;
if( *pp_block )
block_t *block = *pp_block;
if( block != NULL )
{
/* Block to Ogg packet */
oggpacket.packet = (*pp_block)->p_buffer;
oggpacket.bytes = (*pp_block)->i_buffer;
oggpacket.packet = block->p_buffer;
oggpacket.bytes = block->i_buffer;
}
else
{
......@@ -364,13 +366,15 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( CreateDefaultHeader( p_dec ) )
{
block_Release( *pp_block );
if( block != NULL )
block_Release( block );
return NULL;
}
}
else if( ProcessHeaders( p_dec ) )
{
block_Release( *pp_block );
if( block != NULL )
block_Release( block );
return NULL;
}
p_sys->b_has_headers = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment