mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avformat/libopenmpt: Check for avio_size() failure
Fixes CID1396850
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bd8201566d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8ce5038e99
commit
a17d258e94
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user