Commit 2da9586d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

h264 packetizer: Check for negative sps.

(cherry picked from commit 09c2cc894e84a02326e382413f11b88b3c9c15e6)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b144e25c
......@@ -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