diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 0e3de6e2e6..840e9b32e9 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -662,6 +662,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;