Commit 81b32b11 authored by Hannes Domani's avatar Hannes Domani Committed by Tristan Matthews

flac: check block allocation

Signed-off-by: default avatarTristan Matthews <le.businessman@gmail.com>
(cherry picked from commit 7459d06cca4cd0fa29eec101001628d34549c6d1)
parent 7d0bad15
......@@ -400,6 +400,7 @@ static void ProcessHeader( decoder_t *p_dec )
switch (i_extra) {
case 34:
p_sys->p_block = block_Alloc( 8 + i_extra );
if( p_sys->p_block == NULL ) return;
memcpy( p_sys->p_block->p_buffer + 8, p_dec->fmt_in.p_extra, i_extra );
memcpy( p_sys->p_block->p_buffer, header, 4);
uint8_t *p = p_sys->p_block->p_buffer;
......@@ -410,6 +411,7 @@ static void ProcessHeader( decoder_t *p_dec )
break;
case 42:
p_sys->p_block = block_Alloc( i_extra );
if( p_sys->p_block == NULL ) return;
memcpy( p_sys->p_block->p_buffer, p_dec->fmt_in.p_extra, i_extra );
break;
default:
......
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