Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Jun 2013 23:04:33 +0000 (01:04 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Jun 2013 23:04:33 +0000 (01:04 +0200)
* qatar/master:
  smacker: check frame size validity

Conflicts:
libavformat/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/smacker.c

index 7132a855654e78d5a0c730a082dd7de4145f380b,cd4353a1b937487a06753459ef0c126edb3d3345..b4c1bf43358b42b3ceb83d06d61d0a860458fe9d
@@@ -310,8 -308,10 +310,10 @@@ static int smacker_read_packet(AVFormat
                  uint8_t *tmpbuf;
  
                  size = avio_rl32(s->pb) - 4;
-                 if(size + 4L > frame_size)
 -                if (!size || size > frame_size) {
++                if (!size || size + 4L > frame_size) {
+                     av_log(s, AV_LOG_ERROR, "Invalid audio part size\n");
                      return AVERROR_INVALIDDATA;
+                 }
                  frame_size -= size;
                  frame_size -= 4;
                  smk->curstream++;