mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
libavfilter/af_firequalizer: Add check for av_malloc_array()
Add check for the return value of av_malloc_array() to avoid potential NULL pointer dereference. Fixes:d3be186ed1("avfilter/firequalizer: add dumpfile and dumpscale option") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commita25462482c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
346ac063df
commit
0e8ccde9e5
1 changed files with 2 additions and 0 deletions
|
|
@ -808,6 +808,8 @@ static int config_input(AVFilterLink *inlink)
|
|||
if ((ret = av_tx_init(&s->analysis_rdft, &s->analysis_rdft_fn, AV_TX_FLOAT_RDFT, 0, 1 << rdft_bits, &scale, 0)) < 0)
|
||||
return ret;
|
||||
s->dump_buf = av_malloc_array(s->analysis_rdft_len + 2, sizeof(*s->dump_buf));
|
||||
if (!s->dump_buf)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
s->analysis_buf = av_malloc_array((s->analysis_rdft_len + 2), sizeof(*s->analysis_buf));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue