diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-30 12:59:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-30 12:59:16 +0200 |
commit | 6d9dfb1267d0a5b23ed3e857526bbca74223313a (patch) | |
tree | 590dc3dcddab0ff417b095d96a99f9621e7f8f88 /libavformat | |
parent | 3cd6b6aa0f847afeeac7742489f139ce39b4bdcb (diff) | |
parent | 1b4c468477f3b8d372da8ef4e5405539ad9c1501 (diff) | |
download | ffmpeg-6d9dfb1267d0a5b23ed3e857526bbca74223313a.tar.gz |
Merge commit '1b4c468477f3b8d372da8ef4e5405539ad9c1501'
* commit '1b4c468477f3b8d372da8ef4e5405539ad9c1501':
riff: Validate the wav header size before trying to parse it
Conflicts:
libavformat/riffdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/riffdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index a2bfb44719..eebd8ed230 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -87,8 +87,10 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_ { int id; - if (size < 14) + if (size < 14) { avpriv_request_sample(codec, "wav header size < 14"); + return AVERROR_INVALIDDATA; + } codec->codec_type = AVMEDIA_TYPE_AUDIO; if (!big_endian) { |