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

Git pushed a commit to branch master
in repository ffmpeg.

commit 5af7de7e3d4da47d9e8059a435c6c47c2260ede3
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 6 23:22:46 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 20 21:30:18 2026 +0000

    avformat/rtpdec_av1: Read the OBU header byte after the size checks
    
    Moving the read after the checks was suggested in the report.
    
    Hardening for R5y4vDJ078Lr (AISLE-2026-0111-00004)
    Found-by: Joshua Rogers <[email protected]>
---
 libavformat/rtpdec_av1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtpdec_av1.c b/libavformat/rtpdec_av1.c
index f6b1048328..a45a2f149d 100644
--- a/libavformat/rtpdec_av1.c
+++ b/libavformat/rtpdec_av1.c
@@ -228,8 +228,6 @@ static int av1_handle_packet(AVFormatContext *ctx, 
PayloadContext *data,
             rem_pkt_size -= num_lebs;
             buf_ptr += num_lebs;
         }
-        // read first byte (which is the header byte only for non-fragmented 
elements)
-        obu_hdr = *buf_ptr;
         if (obu_size > rem_pkt_size) {
             av_log(ctx, AV_LOG_ERROR, "AV1 OBU size %u larger than remaining 
pkt size %d\n", obu_size, rem_pkt_size);
             return AVERROR_INVALIDDATA;
@@ -240,6 +238,8 @@ static int av1_handle_packet(AVFormatContext *ctx, 
PayloadContext *data,
             return AVERROR_INVALIDDATA;
         }
 
+        // read first byte (which is the header byte only for non-fragmented 
elements)
+        obu_hdr = *buf_ptr;
         if (!is_frag_cont) {
             uint8_t obu_type = (obu_hdr >> AV1S_OBU_TYPE) & AV1M_OBU_TYPE;
             if (obu_hdr & AV1F_OBU_FORBIDDEN) {

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