summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
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 539425cbbe..f70ceb8452 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -601,7 +601,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
return AVERROR_INVALIDDATA;
// enc. code
size = klv_decode_ber_length(pb);
- if (size < 32 || size - 32 < orig_size)
+ if (size < 32 || size - 32 < orig_size || (int)orig_size != orig_size)
return AVERROR_INVALIDDATA;
avio_read(pb, ivec, 16);
avio_read(pb, tmpbuf, 16);