]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rmdec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / rmdec.c
index 5b9bfb869afd187b0b6cc50fe81f5a3b523d0c99..75240236e8a5d7a34dccaf089759c30350bc5e91 100644 (file)
@@ -24,6 +24,7 @@
 #include "libavutil/dict.h"
 #include "avformat.h"
 #include "internal.h"
+#include "avio_internal.h"
 #include "riff.h"
 #include "rm.h"
 
@@ -612,6 +613,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
     }
     if(type != 1){  // not whole frame
         len2 = get_num(pb, &len);
+        len2 = ffio_limit(pb, len2);
         pos  = get_num(pb, &len);
         pic_num = avio_r8(pb); len--;
     }