diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-05-31 14:53:31 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-05-31 15:03:30 +0200 |
commit | 69277069dd225f5ae02f0215e877a06522d834d3 (patch) | |
tree | e15d3c086d01810cb0b146555a24f4eaf5bc08cd | |
parent | e524f37356156893cae50fc46451bd4a6198703d (diff) | |
download | ffmpeg-69277069dd225f5ae02f0215e877a06522d834d3.tar.gz |
dct: Check memory allocation
-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 4dbbff867b..180477e621 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(n / 2 * sizeof(FFTSample)); + if (!s->csc2) + return AVERROR(ENOMEM); if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) { av_free(s->csc2); |