diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-07-24 04:24:33 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-07-27 14:44:07 +0100 |
commit | 03eb55741427c6608f63972c105e565ca0ba4f15 (patch) | |
tree | e4282fcadb90f773329459753495d89de1730bf6 | |
parent | a67b67944aa9e6e794934d15f9fd9a9cf7173e09 (diff) | |
download | ffmpeg-03eb55741427c6608f63972c105e565ca0ba4f15.tar.gz |
wmv2enc: Check memory allocation
-rw-r--r-- | libavcodec/wmv2enc.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |