Commit 5dae442d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

speek: fix potential NULL dereference

parent f0985a7a
......@@ -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