aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2011-12-20 17:39:59 +0100
committerTomas Härdin <tomas.hardin@codemill.se>2011-12-21 14:15:51 +0100
commit2116e4ba917748c0985be2347d400ba0f3fe6c64 (patch)
treefeb686934575f989870df56bf963d1e94c3f50b6
parent5e5e69d0787ae4939f3f8e8d6c0342310eda28ee (diff)
downloadffmpeg-2116e4ba917748c0985be2347d400ba0f3fe6c64.tar.gz
mxfdec: Check url_feof() in mxf_read_local_tags()
This fixes the infinite loop with zzuf2.mxf
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 59c8b4016b..8d60fe76f4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1437,7 +1437,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
if (!ctx)
return -1;
- while (avio_tell(pb) + 4 < klv_end) {
+ while (avio_tell(pb) + 4 < klv_end && !url_feof(pb)) {
int tag = avio_rb16(pb);
int size = avio_rb16(pb); /* KLV specified by 0x53 */
uint64_t next = avio_tell(pb) + size;