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

Git pushed a commit to branch master
in repository ffmpeg.

commit f3299781dfa5513eff172e8eaa07851129d23044
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Nov 16 06:56:38 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Wed Nov 18 12:54:42 2026 +0000

    avformat/matroskadec: reject cue positions before the segment in the DASH 
manifest
    
    Signed integer overflow Replicated through API with UBSAN
    
    Fixes: signed integer overflow: 8872126588269895935 - -360550420148060339 
cannot be represented in type 'int64_t' (aka 'long')
    Fixes: 
575074290/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6200621636845568
    Fixes: a62kXgcPEXgR
    
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/matroskadec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 0963962797..b10bf3ac4e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -4617,6 +4617,7 @@ static CueDesc get_cue_desc(AVFormatContext *s, int64_t 
ts, int64_t cues_start)
     AVIndexEntry *const index_entries = sti->index_entries;
     int nb_index_entries = sti->nb_index_entries;
     CueDesc cue_desc;
+    int64_t end_pos;
     int i;
 
     if (ts >= (int64_t)(matroska->duration * matroska->time_scale))
@@ -4630,6 +4631,9 @@ static CueDesc get_cue_desc(AVFormatContext *s, int64_t 
ts, int64_t cues_start)
     --i;
     if (index_entries[i].timestamp > matroska->duration)
         return (CueDesc) {-1, -1, -1, -1};
+    end_pos = i != nb_index_entries - 1 ? index_entries[i + 1].pos : 
cues_start;
+    if (index_entries[i].pos < matroska->segment_start || end_pos < 
matroska->segment_start)
+        return (CueDesc) {-1, -1, -1, -1};
     cue_desc.start_time_ns = index_entries[i].timestamp * matroska->time_scale;
     cue_desc.start_offset = index_entries[i].pos - matroska->segment_start;
     if (i != nb_index_entries - 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