diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index b7c5f22a3a..0912359133 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -647,6 +647,10 @@ smv_retry: goto smv_out; } size = avio_rl24(s->pb); + if (size > wav->smv_block_size) { + ret = AVERROR_EOF; + goto smv_out; + } ret = av_get_packet(s->pb, pkt, size); if (ret < 0) goto smv_out;