This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit c61944093f57dccb9079bad1612418b2ccb3f6c1 Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Oct 11 07:31:13 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Oct 12 21:18:53 2026 +0000 swscale: reject interlaced frames whose fields have no lines A one line interlaced frame has an empty bottom field, when source and destination format were equal the graph was still built for it and divided by the zero slice height. Fixes: division by zero Fixes: 9FwqJRpgNJo3 Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24851 Division by zero Replicated through UnModified FFmpeg with UBSAN --- libswscale/swscale.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index d224c3275b..070b0f5939 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1562,6 +1562,12 @@ int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src) goto fail; } + if (src_fmt.height <= 0 || dst_fmt.height <= 0) { + err_msg = "Interlaced frames need at least two lines"; + ret = AVERROR(EINVAL); + goto fail; + } + src_ok = ff_test_fmt(backends, &src_fmt, 0); dst_ok = ff_test_fmt(backends, &dst_fmt, 1); if ((!src_ok || !dst_ok) && !ff_fmt_equal(&src_fmt, &dst_fmt)) { -- 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]
