]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rmdec.c
Merge commit '07b5136c481d394992c7e951967df0cfbb346c0b'
[ffmpeg] / libavformat / rmdec.c
index 178eaea57d89dd04d8c04d59101d047ac0daa4b6..d6d7d9cd8414da5030021d513eebf943c69238ca 100644 (file)
@@ -1223,8 +1223,11 @@ static int ivr_read_header(AVFormatContext *s)
             av_log(s, AV_LOG_DEBUG, "%s = '%s'\n", key, val);
         } else if (type == 4) {
             av_log(s, AV_LOG_DEBUG, "%s = '0x", key);
-            for (j = 0; j < len; j++)
+            for (j = 0; j < len; j++) {
+                if (avio_feof(pb))
+                    return AVERROR_INVALIDDATA;
                 av_log(s, AV_LOG_DEBUG, "%X", avio_r8(pb));
+            }
             av_log(s, AV_LOG_DEBUG, "'\n");
         } else if (len == 4 && type == 3 && !strncmp(key, "StreamCount", tlen)) {
             nb_streams = value = avio_rb32(pb);