Bug-Id: CID 1257806
---
 libavcodec/dct.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index 4dbbff8..e0337ee 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -192,6 +192,9 @@ 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);
             return -1;
-- 
2.1.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to