diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2011-12-20 17:39:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 20:50:30 +0100 |
commit | 46e4dd66dafda925748c40238904040fe20d5407 (patch) | |
tree | 1bc6658da839897208328d231b4a088361ef9621 | |
parent | 7e35c3e177ad03411ca3a275ecac4bc9891f89b5 (diff) | |
download | ffmpeg-46e4dd66dafda925748c40238904040fe20d5407.tar.gz |
mxfdec: Check url_feof() in mxf_read_local_tags()
This fixes the infinite loop with zzuf2.mxf
(cherry picked from commit 2116e4ba917748c0985be2347d400ba0f3fe6c64)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index d3db5461ac..58bda9a85f 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; |