]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/wvdec.c
Merge commit '0a024268261d05ccdcf7e03c85fb78d22037a464'
[ffmpeg] / libavformat / wvdec.c
index 5a8d9c72e636e7a15478fe84e4b08e4edeaa0939..76768cdf26682505436de49fc35d72443cba76e3 100644 (file)
@@ -124,7 +124,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
                    "Cannot determine additional parameters\n");
             return AVERROR_INVALIDDATA;
         }
-        while (avio_tell(pb) < block_end) {
+        while (avio_tell(pb) < block_end && !avio_feof(pb)) {
             int id, size;
             id   = avio_r8(pb);
             size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb);