aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfoo86 <foobaz86@gmail.com>2017-07-22 18:16:13 +0300
committerfoo86 <foobaz86@gmail.com>2017-07-23 00:28:18 +0300
commit34fb84a97d112d85091369e9ef9ce177a05644e9 (patch)
tree0d9810daa8a3b0292166199d9b060b8e2a1d9188
parentf2c11b9337c90b98c315d8e24de43fffb48fed60 (diff)
downloadffmpeg-34fb84a97d112d85091369e9ef9ce177a05644e9.tar.gz
avcodec/dcaadpcm: check for av_malloc() failure
Fixes CID 1409915.
-rw-r--r--libavcodec/dcaadpcm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dcaadpcm.c b/libavcodec/dcaadpcm.c
index 8742c7ccf6..cc82241a5f 100644
--- a/libavcodec/dcaadpcm.c
+++ b/libavcodec/dcaadpcm.c
@@ -215,6 +215,9 @@ av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s)
return -1;
s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);
+ if (!s->private_data)
+ return AVERROR(ENOMEM);
+
precalc(s->private_data);
return 0;
}