diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-24 17:33:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-24 17:33:32 +0100 |
commit | 014058abeaa9da2c107a6348178431ea8c9b0bab (patch) | |
tree | 37998ae6e0aa962231c09028e713b94037885b33 /libavfilter/af_aresample.c | |
parent | ed017ab945ed2ce13352a0eb627a21e875082834 (diff) | |
download | ffmpeg-014058abeaa9da2c107a6348178431ea8c9b0bab.tar.gz |
af_aresample: check ff_get_audio_buffer() failure
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_aresample.c')
-rw-r--r-- | libavfilter/af_aresample.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 7201d37f40..5e43281ca9 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -179,6 +179,9 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref) AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out); int ret; + if(!outsamplesref) + return AVERROR(ENOMEM); + avfilter_copy_buffer_ref_props(outsamplesref, insamplesref); outsamplesref->format = outlink->format; outsamplesref->audio->channel_layout = outlink->channel_layout; |