PR #22882 opened by Marvin Scholz (ePirat)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22882
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22882.patch

Do not blindly try to dereference the return value of
av_frame_side_data_desc as it might be NULL.

Fix Coverity issue 1668264


>From 23c7668678e8959f2c424dc2694d66a6fd749812 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <[email protected]>
Date: Tue, 21 Apr 2026 23:12:09 +0200
Subject: [PATCH] fftools: check av_frame_side_data_desc return

Do not blindly try to dereference the return value of
av_frame_side_data_desc as it might be NULL.

Fix Coverity issue 1668264
---
 fftools/ffmpeg_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index eed0f06c6d..6e3c7c1948 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -2269,7 +2269,7 @@ static int ifilter_parameters_from_frame(InputFilter 
*ifilter, const AVFrame *fr
     for (int i = 0; i < frame->nb_side_data; i++) {
         const AVSideDataDescriptor *desc = 
av_frame_side_data_desc(frame->side_data[i]->type);
 
-        if (!(desc->props & AV_SIDE_DATA_PROP_GLOBAL) ||
+        if (!desc || !(desc->props & AV_SIDE_DATA_PROP_GLOBAL) ||
             frame->side_data[i]->type == AV_FRAME_DATA_DISPLAYMATRIX)
             continue;
 
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to