diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-08 08:55:56 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-08 12:06:00 +0200 |
commit | 5e1dac380bea627e5b7751e07bdabc0f4ee139c2 (patch) | |
tree | facc9dbf3f15a7b226fe89af4e38986ca3d669d0 /tests/ref/vsynth/vsynth2-qtrlegray | |
parent | 4ff884069787161138e604b7aae495d27c457287 (diff) | |
download | ffmpeg-5e1dac380bea627e5b7751e07bdabc0f4ee139c2.tar.gz |
avfilter/avfiltergraph: Fix use-after-free when inserting auto-converter
When inserting an auto-resampler, it may be that the configuration
of the filters that the auto-resampler is supposed to connect is
already partially merged, i.e. converter->inputs[0].incfg.foo and
converter->outputs[0].outcfg.foo (where foo is one of formats,
samplerates, channel_layouts) can coincide. Therefore merging
the converter filter's input link might modify the outcfg of the
converter' outlink. Yet the current code in avfiltergraph.c used
pointers from before merging the inlink for merging the outlink,
leading to a use-after-free in command lines like:
$ ffmpeg -f lavfi -i anullsrc=cl=stereo -lavfi channelsplit,axcorrelate -f null -
Fix this by not using outdated values when merging the outlink.
This is a regression since 85a6404d7e6c759ddf71d6374812d7ff719728ec.
Found-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests/ref/vsynth/vsynth2-qtrlegray')
0 files changed, 0 insertions, 0 deletions