summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/wavdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index df6030a42d..67ab620347 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -558,6 +558,9 @@ static int wav_read_header(AVFormatContext *s)
for (int i = 0; i < nb_cues; i++) {
unsigned offset, id = avio_rl32(pb);
+ if (avio_feof(pb))
+ return AVERROR_INVALIDDATA;
+
avio_skip(pb, 16);
offset = avio_rl32(pb);