diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-22 04:47:14 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-26 23:52:56 +0200 |
commit | 97b1a2c564e0d4dbf8573b4647ae110a75238db3 (patch) | |
tree | 2de00d158fedaa58c9afb40479d0053ad576e96f /libavformat/aiff.h | |
parent | 281b8187e355b42f86b7a62f0fe93e6093484051 (diff) | |
download | ffmpeg-97b1a2c564e0d4dbf8573b4647ae110a75238db3.tar.gz |
avfilter/af_aiir: Fix segfault and leak upon allocation failure
The aiir filter adds output pads in its init function. Each of these
output pads had a name which was allocated and to be freed in the uninit
function. Given that the aiir filter has between one and two outputs,
one output pad's name was freed unconditionally and a second was freed
conditionally.
Yet if adding output pads fails, there are no output pads at all and
trying to free a nonexistent pad's name will lead to a segfault.
Furthermore, if the name could be successfully allocated, yet adding the
new pad fails, the name would leak.
This commit fixes this by not allocating the pads' names at all any
more: They are constant anyway. This allows to remove the code to free
them and hence fixes the aforementioned bugs.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/aiff.h')
0 files changed, 0 insertions, 0 deletions