summaryrefslogtreecommitdiff
path: root/libavformat/wavdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-16 23:33:48 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-17 02:08:58 +0200
commit2acc06565321fde44faf407679c9c211aacaca08 (patch)
tree1ffc1799027ddac418b5dc64238a9732fec5ea39 /libavformat/wavdec.c
parent2608f11863918c7d82c3cb8928f6224d67e83bf1 (diff)
lavf/wav: Read files >4G if no smaller filesize was written.
Fixes second part of ticket #4543.
Diffstat (limited to 'libavformat/wavdec.c')
-rw-r--r--libavformat/wavdec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 410c2ec1f9..befc664688 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -335,9 +335,14 @@ static int wav_read_header(AVFormatContext *s)
if (rf64) {
next_tag_ofs = wav->data_end = avio_tell(pb) + data_size;
- } else {
+ } else if (size != 0xFFFFFFFF) {
data_size = size;
next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX;
+ } else {
+ av_log(s, AV_LOG_WARNING, "Ignoring maximum wav data size, "
+ "file may be invalid\n");
+ data_size = 0;
+ next_tag_ofs = wav->data_end = INT64_MAX;
}
data_ofs = avio_tell(pb);