aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-05-31 14:54:21 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-31 15:03:31 +0200
commit8df5fbf0b0c0ba12b033e61c28fc240f4bccba47 (patch)
tree04994e879a8ec0cde8f7fe35ea054bc8a526e2a5
parent7ca603f96f93d988e01d161d611f69a4ecaa3f02 (diff)
downloadffmpeg-8df5fbf0b0c0ba12b033e61c28fc240f4bccba47.tar.gz
lcl: Check memory allocation
-rw-r--r--libavcodec/lclenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 20841bcf58..2448b9ef91 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -135,6 +135,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
assert(avctx->width && avctx->height);
avctx->extradata= av_mallocz(8);
+ if (!avctx->extradata)
+ return AVERROR(ENOMEM);
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)