PR #24520 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24520 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24520.patch
The mermaid formatters draw filter graphs and need the diagram configuration that only graphprint provides, so selecting them with -of made ffprobe dereference a NULL configuration while printing the root section. Fixes: NULL pointer dereference Fixes: sgcKd3ZT8oua Found-by: Zheng Yu @ Depthfirst >From 9cc255751c621f68c5800d5582e5eee954f6d94c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Tue, 15 Sep 2026 06:15:16 +0200 Subject: [PATCH] fftools/ffprobe: refuse the diagram output formats The mermaid formatters draw filter graphs and need the diagram configuration that only graphprint provides, so selecting them with -of made ffprobe dereference a NULL configuration while printing the root section. Fixes: NULL pointer dereference Fixes: sgcKd3ZT8oua Found-by: Zheng Yu @ Depthfirst --- fftools/ffprobe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index cc622cfdc3..1638157eee 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3451,6 +3451,11 @@ int main(int argc, char **argv) ret = AVERROR(EINVAL); goto end; } + if (f->flags & AV_TEXTFORMAT_FLAG_IS_DIAGRAM_FORMATTER) { + av_log(NULL, AV_LOG_ERROR, "Output format '%s' can only draw filter graphs\n", f_name); + ret = AVERROR(EINVAL); + goto end; + } if (data_dump_format) { if (!strcmp(data_dump_format, "xxd")) { -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
