Commit fc81c4e2 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: don't NULL dereference on failed realloc

parent 66b32e89
......@@ -721,7 +721,8 @@ static int Mux(sout_mux_t *p_mux)
static block_t *ConvertSUBT(block_t *p_block)
{
p_block = block_Realloc(p_block, 2, p_block->i_buffer);
if( !p_block )
return NULL;
/* No trailling '\0' */
if (p_block->i_buffer > 2 && p_block->p_buffer[p_block->i_buffer-1] == '\0')
p_block->i_buffer--;
......@@ -2836,6 +2837,9 @@ static int MuxFrag(sout_mux_t *p_mux)
break;
}
if( !p_currentblock )
return VLC_ENOMEM;
/* If we have a previous entry for outgoing queue */
if (p_stream->p_held_entry)
{
......
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