]> git.sesse.net Git - ffmpeg/commitdiff
lcl: Check memory allocation
authorVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 31 May 2015 12:54:21 +0000 (14:54 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 31 May 2015 13:03:31 +0000 (15:03 +0200)
libavcodec/lclenc.c

index 20841bcf58465a9f9b4bae4a3928866c5fa8a9b0..2448b9ef91e3c537df5d183e48c28238ce89e69d 100644 (file)
@@ -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)