File ffmpeg-4-CVE-2025-22919.patch of Package ffmpeg-4
xxxxxxxxxx
1
From 1446e37d3d032e1452844778b3e6ba2c20f0c322 Mon Sep 17 00:00:00 2001
2
From: James Almer <jamrial@gmail.com>
3
Date: Mon, 30 Dec 2024 00:25:41 -0300
4
Subject: [PATCH] avfilter/buffersrc: check for valid sample rate
5
6
A sample rate <= 0 is invalid.
7
8
Fixes an assert in ffmpeg_enc.c that assumed a valid sample rate would be set.
9
Fixes ticket #11385.
10
11
Signed-off-by: James Almer <jamrial@gmail.com>
12
---
13
libavfilter/buffersrc.c | 5 +++++
14
1 file changed, 5 insertions(+)
15
16
--- a/libavfilter/buffersrc.c
17
+++ b/libavfilter/buffersrc.c
18
19
return AVERROR(EINVAL);
20
}
21
22
+ if (s->sample_rate <= 0) {
23
+ av_log(ctx, AV_LOG_ERROR, "Sample rate not set\n");
24
+ return AVERROR(EINVAL);
25
+ }
26
+
27
if (!s->time_base.num)
28
s->time_base = (AVRational){1, s->sample_rate};
29
30