diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:42:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:42:13 +0200 |
commit | 3a8b16f78e8bf35328f9d70506c1205bb258792c (patch) | |
tree | 4159323a6ea800330e44d62a15b48cf9f62471ea /libavcodec/dct.c | |
parent | 7110b024a90097312794b55d1145724e10589c59 (diff) | |
parent | 69277069dd225f5ae02f0215e877a06522d834d3 (diff) | |
download | ffmpeg-3a8b16f78e8bf35328f9d70506c1205bb258792c.tar.gz |
Merge commit '69277069dd225f5ae02f0215e877a06522d834d3'
* commit '69277069dd225f5ae02f0215e877a06522d834d3':
dct: Check memory allocation
Conflicts:
libavcodec/dct.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dct.c')
-rw-r--r-- | libavcodec/dct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dct.c b/libavcodec/dct.c index 9cabc4f591..cca51eeaf8 100644 --- a/libavcodec/dct.c +++ b/libavcodec/dct.c @@ -191,6 +191,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) s->costab = ff_cos_tabs[nbits + 2]; s->csc2 = av_malloc_array(n / 2, sizeof(FFTSample)); + if (!s->csc2) + return AVERROR(ENOMEM); if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) { av_freep(&s->csc2); |