diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index 09fee9d603..88e2229a77 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -84,6 +84,9 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) { int id; + if (size < 14) + avpriv_request_sample(codec, "wav header size < 14"); + id = avio_rl16(pb); codec->codec_type = AVMEDIA_TYPE_AUDIO; codec->channels = avio_rl16(pb);