diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 1f372affcb..840484b37e 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2903,7 +2903,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF meta = NULL; ctx = mxf; } - while (avio_tell(pb) + 4 < klv_end && !avio_feof(pb)) { + while (avio_tell(pb) + 4ULL < klv_end && !avio_feof(pb)) { int ret; int tag = avio_rb16(pb); int size = avio_rb16(pb); /* KLV specified by 0x53 */