aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-30 12:59:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-30 12:59:16 +0200
commit6d9dfb1267d0a5b23ed3e857526bbca74223313a (patch)
tree590dc3dcddab0ff417b095d96a99f9621e7f8f88 /libavformat
parent3cd6b6aa0f847afeeac7742489f139ce39b4bdcb (diff)
parent1b4c468477f3b8d372da8ef4e5405539ad9c1501 (diff)
downloadffmpeg-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.c4
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) {