This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch release/9.0
in repository ffmpeg.
The following commit(s) were added to refs/heads/release/9.0 by this push:
new 0ba284bbcb avformat/matroskadec: prevent duration float-cast-overflow
0ba284bbcb is described below
commit 0ba284bbcbbefecfd110859acce36cbc8a4bdf82
Author: Marvin Scholz <[email protected]>
AuthorDate: Tue Sep 29 13:00:40 2026 +0000
Commit: ffmpeg-devel <[email protected]>
CommitDate: Thu Oct 29 21:32:38 2026 +0000
avformat/matroskadec: prevent duration float-cast-overflow
Reset matroska->duration to 0 if it is negative or if matroska->duration *
matroska->time_scale would exceed INT64_MAX, preventing a
float-cast-overflow
when calculating the duration.
Signed-off-by: Marvin Scholz <[email protected]>
(cherry picked from commit d42f8d8767cb0d11fdbd5bf7c3dc2e426f97b3ca)
---
libavformat/matroskadec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 18849af689..b074354116 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3490,7 +3490,8 @@ static int matroska_read_header(AVFormatContext *s)
if (!matroska->time_scale)
matroska->time_scale = 1000000;
- if (isnan(matroska->duration))
+ if (isnan(matroska->duration) || matroska->duration < 0 ||
+ matroska->duration >= (double)INT64_MAX / matroska->time_scale)
matroska->duration = 0;
if (matroska->duration)
matroska->ctx->duration = matroska->duration * matroska->time_scale *
--
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]