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 ae348e4aa2 avformat/mov: validate the per-sample IV size before 
storing it
ae348e4aa2 is described below

commit ae348e4aa24634a00ee41285b59817fcb190d7e9
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Sep 24 21:54:52 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Fri Sep 25 03:21:08 2026 +0000

    avformat/mov: validate the per-sample IV size before storing it
    
    Fixes: heap-buffer-overflow (write)
    Fixes: gSJzpqrLJWHW
    Fixes: ANT-2026-B5JD9MD9-poc17.mp4
    Fixes: ANT-2026-B5JD9MD9-poc255.mp4
    Found-by: Claude and Ada Logics
---
 libavformat/mov.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8ddedf269b..d514292c9c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -8519,12 +8519,12 @@ static int mov_read_tenc(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
         if (!sc->cenc.encryption_index)
             return AVERROR(ENOMEM);
     }
-    sc->cenc.per_sample_iv_size = avio_r8(pb);
-    if (sc->cenc.per_sample_iv_size != 0 && sc->cenc.per_sample_iv_size != 8 &&
-        sc->cenc.per_sample_iv_size != 16) {
+    iv_size = avio_r8(pb);
+    if (iv_size != 0 && iv_size != 8 && iv_size != 16) {
         av_log(c->fc, AV_LOG_ERROR, "invalid per-sample IV size value\n");
         return AVERROR_INVALIDDATA;
     }
+    sc->cenc.per_sample_iv_size = iv_size;
     if (avio_read(pb, sc->cenc.default_encrypted_sample->key_id, 16) != 16) {
         av_log(c->fc, AV_LOG_ERROR, "failed to read the default key ID\n");
         return AVERROR_INVALIDDATA;

-- 
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