aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/libopenmpt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-30 22:55:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commita17d258e949e27086413db9da2ea01923de32990 (patch)
tree5be51c493627f4cc5accdb2d6ab2ba8ef8d077b9 /libavformat/libopenmpt.c
parent8ce5038e9998e368729b222f3438da4163d339ae (diff)
downloadffmpeg-a17d258e949e27086413db9da2ea01923de32990.tar.gz
avformat/libopenmpt: Check for avio_size() failure
Fixes CID1396850 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit bd8201566d754384105923bb1fb3bb3a5c08cc8b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/libopenmpt.c')
-rw-r--r--libavformat/libopenmpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index 35fd28f5f4..a7e385959a 100644
--- a/libavformat/libopenmpt.c
+++ b/libavformat/libopenmpt.c
@@ -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;