Re: [FFmpeg-devel] [PATCH 19/40] avcodec/atrac1: Check allocation of AVFloatDSPContext

2020-09-14 Thread Paul B Mahol
On Mon, Sep 14, 2020 at 07:27:26AM +0200, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt 
> ---
>  libavcodec/atrac1.c | 4 
>  1 file changed, 4 insertions(+)
> 

lgtm
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 19/40] avcodec/atrac1: Check allocation of AVFloatDSPContext

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt 
---
 libavcodec/atrac1.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index a8c8c91bcc..9ecd49273d 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -362,6 +362,10 @@ static av_cold int atrac1_decode_init(AVCodecContext 
*avctx)
 ff_atrac_generate_tables();
 
 q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
+if (!q->fdsp) {
+atrac1_decode_end(avctx);
+return AVERROR(ENOMEM);
+}
 
 q->bands[0] = q->low;
 q->bands[1] = q->mid;
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".