diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 7a7e765353..01090b6947 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -498,6 +498,8 @@ static int wav_read_header(AVFormatContext *s) wav->smv_data_ofs = avio_tell(pb) + (size - 5) * 3; avio_rl24(pb); wav->smv_block_size = avio_rl24(pb); + if (!wav->smv_block_size) + return AVERROR_INVALIDDATA; avpriv_set_pts_info(vst, 32, 1, avio_rl24(pb)); vst->duration = avio_rl24(pb); avio_rl24(pb);