Commit 1b4c4684 authored by Luca Barbato's avatar Luca Barbato

riff: Validate the wav header size before trying to parse it

parent 5bdfc171
......@@ -79,6 +79,9 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
{
int id;
if (size < 14)
return AVERROR_INVALIDDATA;
id = avio_rl16(pb);
codec->codec_type = AVMEDIA_TYPE_AUDIO;
codec->channels = avio_rl16(pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment