Commit bd820156 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/libopenmpt: Check for avio_size() failure

Fixes CID1396850
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 477ba8f9
......@@ -73,7 +73,7 @@ static int read_header_openmpt(AVFormatContext *s)
AVStream *st;
OpenMPTContext *openmpt = s->priv_data;
int64_t size = avio_size(s->pb);
if (!size)
if (size <= 0)
return AVERROR_INVALIDDATA;
char *buf = av_malloc(size);
int ret;
......
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