Module: libav Branch: master Commit: 1b4c468477f3b8d372da8ef4e5405539ad9c1501
Author: Luca Barbato <[email protected]> Committer: Luca Barbato <[email protected]> Date: Sun Jun 28 17:32:40 2015 +0200 riff: Validate the wav header size before trying to parse it --- libavformat/riffdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index 74f93ac..2c43afc 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -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); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
