[FFmpeg-cvslog] avformat/libopenmpt: Check for avio_size() failure
Michael Niedermayer
git at videolan.org
Fri Mar 31 00:36:05 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 30 22:55:28 2017 +0200| [bd8201566d754384105923bb1fb3bb3a5c08cc8b] | committer: Michael Niedermayer
avformat/libopenmpt: Check for avio_size() failure
Fixes CID1396850
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd8201566d754384105923bb1fb3bb3a5c08cc8b
---
libavformat/libopenmpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index 35fd28f..a7e3859 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;
More information about the ffmpeg-cvslog
mailing list