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

Git pushed a commit to branch master
in repository ffmpeg.

commit 6fdfafa31a535c5a6b50712ee85f59c0a7a02bd4
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 6 07:32:41 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 13 02:29:51 2026 +0000

    avformat/movenc: Check the pixel format for AVIF output
    
    Fixes: NULL pointer dereference
    Fixes: UwVT8CSrU4Oh
    Fixes: AISLE-2026-0111-00172
    NULL pointer dereference Replicated through UnModified FFmpeg with 
ASAN,UBSAN
    Found-by: Joshua Rogers <[email protected]>
---
 libavformat/movenc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 7cdbf6bd59..f4284ded0a 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -8401,10 +8401,14 @@ static int mov_init(AVFormatContext *s)
             av_log(s, AV_LOG_ERROR, "AVIF output supports only video 
streams\n");
             return AVERROR(EINVAL);
         }
+        if (!av_pix_fmt_desc_get(s->streams[0]->codecpar->format)) {
+            av_log(s, AV_LOG_ERROR, "AVIF output requires a known pixel 
format\n");
+            return AVERROR(EINVAL);
+        }
         if (s->nb_streams > 1) {
             const AVPixFmtDescriptor *pixdesc =
                 av_pix_fmt_desc_get(s->streams[1]->codecpar->format);
-            if (pixdesc->nb_components != 1) {
+            if (!pixdesc || pixdesc->nb_components != 1) {
                 av_log(s, AV_LOG_ERROR, "Second stream for AVIF (alpha) output 
must have exactly one plane\n");
                 return AVERROR(EINVAL);
             }

-- 
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