Commit 4faf56ff authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

packetizer: mpeg4video: check for oob read

parent 19b8ec85
...@@ -285,6 +285,9 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag ) ...@@ -285,6 +285,9 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
block_t *p_pic = NULL; block_t *p_pic = NULL;
if( p_frag->i_buffer < 4 )
return p_frag;
const uint32_t i_startcode = GetDWBE( p_frag->p_buffer ); const uint32_t i_startcode = GetDWBE( p_frag->p_buffer );
if( i_startcode == VISUAL_OBJECT_SEQUENCE_START_CODE || if( i_startcode == VISUAL_OBJECT_SEQUENCE_START_CODE ||
i_startcode == VISUAL_OBJECT_SEQUENCE_END_CODE || i_startcode == VISUAL_OBJECT_SEQUENCE_END_CODE ||
......
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