X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fbink.c;h=5eb22111f0c6d34b9c73fee6fb156be817b550ae;hb=bc426827492f6c741608af37e2eaab6c8072815d;hp=20cf609cd001d7a74c3e89893833e9cd8928560e;hpb=653d117c29123d353ce3bdd7de71e830a26733c1;p=ffmpeg diff --git a/libavformat/bink.c b/libavformat/bink.c index 20cf609cd00..5eb22111f0c 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -115,6 +115,8 @@ static int read_header(AVFormatContext *s) vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_BINKVIDEO; vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE); + if (!vst->codec->extradata) + return AVERROR(ENOMEM); vst->codec->extradata_size = 4; avio_read(pb, vst->codec->extradata, 4);