aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2012-01-26 13:21:35 +0100
committerDiego Biurrun <diego@biurrun.de>2012-02-09 12:41:50 +0100
commit0373ec635d21c2738d7e4a8a76846753a76450aa (patch)
treee05d6c314784113f6d9bb21ac110efbf9ed5a826 /libavformat/mxfdec.c
parenteffe3b9575bf5770b228df37675a976a68e8a5e3 (diff)
downloadffmpeg-0373ec635d21c2738d7e4a8a76846753a76450aa.tar.gz
mxfdec: Check eof_reached in mxf_read_local_tags()
This fixes an infinite loop with zzuf2.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 7b61168277..fd40fdb275 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1471,7 +1471,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
if (!ctx)
return AVERROR(ENOMEM);
- while (avio_tell(pb) + 4 < klv_end) {
+ while (avio_tell(pb) + 4 < klv_end && !pb->eof_reached) {
int ret;
int tag = avio_rb16(pb);
int size = avio_rb16(pb); /* KLV specified by 0x53 */