Skip to content
Snippets Groups Projects
Commit 6e8fe448 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/wmv2enc: allocate padding for extradata and check malloc failure

parent 5441eb46
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,9 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx){
ff_wmv2_common_init(w);
avctx->extradata_size= 4;
avctx->extradata= av_mallocz(avctx->extradata_size + 10);
avctx->extradata= av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!avctx->extradata)
return AVERROR(ENOMEM);
encode_ext_header(w);
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment