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 5beeb3a1f9)
release/7.1
Marvin Scholz 5 months ago committed by James Almer
parent 4c0ef3bfae
commit e14a3a4b11
  1. 2
      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);
}

Loading…
Cancel
Save