Commit 6298967b authored by François Cartegnie's avatar François Cartegnie 🤞

demux: avi: check stride width

parent 9b390db4
......@@ -912,12 +912,12 @@ static block_t * ReadFrame( demux_t *p_demux, const avi_track_t *tk,
p_frame->p_buffer += i_header;
p_frame->i_buffer -= i_header;
if ( !tk->i_width_bytes )
return p_frame;
const unsigned int i_stride_bytes = ((( (tk->i_width_bytes << 3) + 31) & ~31) >> 3);
if ( p_frame->i_buffer < i_stride_bytes )
if ( !tk->i_width_bytes || !i_stride_bytes )
return p_frame;
if( p_frame->i_buffer < i_stride_bytes )
{
p_frame->i_buffer = 0;
return p_frame;
......
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