Commit 03eb5574 authored by Vittorio Giovara's avatar Vittorio Giovara

wmv2enc: Check memory allocation

parent a67b6794
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment