ffmpeg | branch: master | Zhao Zhili <quinkbl...@foxmail.com> | Thu Sep  6 
17:15:11 2018 +0800| [b9d1f5bf68111772e552421d21a32b0d61718899] | committer: 
Michael Niedermayer

avcodec/h264dec: check number of SPS in is_extra

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9d1f5bf68111772e552421d21a32b0d61718899
---

 libavcodec/h264dec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 8d115fa040..1f44ed18d9 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -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)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to