Commit 09c2cc89 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

h264 packetizer: Check for negative sps.

parent 03029647
......@@ -820,7 +820,7 @@ static void PutSPS( decoder_t *p_dec, block_t *p_frag )
p_dec->fmt_out.i_level = bs_read( &s, 8 );
/* sps id */
i_sps_id = bs_read_ue( &s );
if( i_sps_id >= SPS_MAX )
if( i_sps_id >= SPS_MAX || i_sps_id < 0 )
{
msg_Warn( p_dec, "invalid SPS (sps_id=%d)", i_sps_id );
free( pb_dec );
......
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