mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
avcodec/dovi_rpuenc: do not divide by a zero frame rate denominator
Fixes: TPu5aVjgBh7t/testcase/crafted.hevc Fixes: TPu5aVjgBh7t Fixes: AISLE-2026-0150-00819 Fixes: division by zero Division by zero Replicated through UnModified FFmpeg with UBSAN Found-by: Joshua Rogers (AISLE) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
1 parent
34908ab5e1
commit
ab28d57ba2
1 file changed
+1
-1
@@ -183,7 +183,7 @@ static av_cold int dovi_configure_ext(DOVIContext *s, enum AVCodecID codec_id,
|
||||
}
|
||||
|
||||
pps = width * height;
|
||||
if (framerate.num) {
|
||||
if (framerate.num > 0 && framerate.den > 0) {
|
||||
pps = pps * framerate.num / framerate.den;
|
||||
} else {
|
||||
pps *= 25; /* sanity fallback */
|
||||
|
||||
Reference in new issue
Block a user