Commit b9d1f5bf authored by Zhao Zhili's avatar Zhao Zhili Committed by Michael Niedermayer

avcodec/h264dec: check number of SPS in is_extra

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9f60c585
......@@ -855,6 +855,8 @@ static int is_extra(const uint8_t *buf, int buf_size)
{
int cnt= buf[5]&0x1f;
const uint8_t *p= buf+6;
if (!cnt)
return 0;
while(cnt--){
int nalsize= AV_RB16(p) + 2;
if(nalsize > buf_size - (p-buf) || (p[2] & 0x9F) != 7)
......
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