Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-30 13:59:16 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-30 13:59:16 +0300
commit6d9dfb1267d0a5b23ed3e857526bbca74223313a (patch)
tree590dc3dcddab0ff417b095d96a99f9621e7f8f88 /libavformat/riffdec.c
parent3cd6b6aa0f847afeeac7742489f139ce39b4bdcb (diff)
parent1b4c468477f3b8d372da8ef4e5405539ad9c1501 (diff)
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/riffdec.c')
-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) {