This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 065cfa5497 avformat/mxfdec: Check reads in mxf_decrypt_triplet
065cfa5497 is described below

commit 065cfa5497fb393c2579d8b67157c245b0b8b04e
Author:     Richard Desmarais <[email protected]>
AuthorDate: Mon Nov 16 19:14:53 2026 -0500
Commit:     Baptiste Coudurier <[email protected]>
CommitDate: Wed Nov 25 02:36:18 2026 +0000

    avformat/mxfdec: Check reads in mxf_decrypt_triplet
---
 libavformat/mxfdec.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index a47a01812f..8b37aa31df 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -690,7 +690,9 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket 
*pkt, KLVPacket *klv
     plaintext_size = avio_rb64(pb);
     // source klv key
     klv_decode_ber_length(pb, NULL);
-    avio_read(pb, klv->key, 16);
+    ret = ffio_read_size(pb, klv->key, 16);
+    if (ret < 0)
+        return ret;
     if (!IS_KLV_KEY(klv, mxf_essence_element_key))
         return AVERROR_INVALIDDATA;
 
@@ -707,9 +709,11 @@ static int mxf_decrypt_triplet(AVFormatContext *s, 
AVPacket *pkt, KLVPacket *klv
     size = klv_decode_ber_length(pb, NULL);
     if (size < 32 || size - 32 < orig_size || (int)orig_size != orig_size)
         return AVERROR_INVALIDDATA;
-    avio_read(pb, ivec, 16);
+    ret = ffio_read_size(pb, ivec, 16);
+    if (ret < 0)
+        return ret;
     ret = ffio_read_size(pb, tmpbuf, 16);
-    if (ret < 16)
+    if (ret < 0)
         return ret;
     if (mxf->aesc)
         av_aes_crypt(mxf->aesc, tmpbuf, tmpbuf, 1, ivec, 1);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to