Commit 5eaed79f authored by Clément Lecigne's avatar Clément Lecigne Committed by Rémi Denis-Courmont

ty: fix out of bound read on corrupt files

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit 07616a8e)
parent b7191b85
...@@ -417,7 +417,7 @@ static int Demux( demux_t *p_demux ) ...@@ -417,7 +417,7 @@ static int Demux( demux_t *p_demux )
/* parse the next chunk's record headers */ /* parse the next chunk's record headers */
if( p_sys->b_first_chunk || p_sys->i_cur_rec >= p_sys->i_num_recs ) if( p_sys->b_first_chunk || p_sys->i_cur_rec >= p_sys->i_num_recs )
{ {
if( get_chunk_header(p_demux) == 0 ) if( get_chunk_header(p_demux) == 0 || p_sys->i_num_recs == 0 )
return 0; return 0;
} }
......
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