From 03eb55741427c6608f63972c105e565ca0ba4f15 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 24 Jul 2015 04:24:33 +0100 Subject: wmv2enc: Check memory allocation --- libavcodec/wmv2enc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/wmv2enc.c') diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index e4e51d32f9..e4d4159e37 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -63,6 +63,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx) avctx->extradata_size = 4; avctx->extradata = av_mallocz(avctx->extradata_size + 10); + if (!avctx->extradata) + return AVERROR(ENOMEM); + encode_ext_header(w); return 0; -- cgit v1.2.3