]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apngdec.c
lavc/qtrle: Avoid an unaligned 64-bit write.
[ffmpeg] / libavformat / apngdec.c
index f9a97e56813e12e491e2198d931765d91106f05c..53cdd4538e010b9c2ef6560adcb6bbc15e60b889 100644 (file)
@@ -342,6 +342,10 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     len = avio_rb32(pb);
     tag = avio_rl32(pb);
+
+    if (avio_feof(pb))
+        return AVERROR_EOF;
+
     switch (tag) {
     case MKTAG('f', 'c', 'T', 'L'):
         if (len != 26)