ffmpeg | branch: release/7.1 | Marvin Scholz <epira...@gmail.com> | Tue Oct  1 
02:57:11 2024 +0200| [e14a3a4b116122899dc8d251d6b890ae378f9802] | committer: 
James Almer

fftools: do not access out of bounds filtergraph

The log message was logged for `filtergraphs[j]` which would cause a
heap buffer overflow in certain circumstances.

Correctly it should be logged for the current filtergraph, so just
use `fg` here.

(cherry picked from commit 5beeb3a1f97d8f6d4076fe83aaf5e2e5871f945e)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e14a3a4b116122899dc8d251d6b890ae378f9802
---

 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 7ec328e04e..2f2b297932 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1408,7 +1408,7 @@ int fg_finalise_bindings(void)
         for (int j = 0; j < fg->nb_outputs; j++) {
             OutputFilter *output = fg->outputs[j];
             if (!output->bound) {
-                av_log(filtergraphs[j], AV_LOG_FATAL,
+                av_log(fg, AV_LOG_FATAL,
                        "Filter %s has an unconnected output\n", output->name);
                 return AVERROR(EINVAL);
             }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to