OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bdfc17
)
riff: Validate the wav header size before trying to parse it
author
Luca Barbato
<lu_zero@gentoo.org>
Sun, 28 Jun 2015 15:32:40 +0000
(17:32 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Sun, 28 Jun 2015 15:32:40 +0000
(17:32 +0200)
libavformat/riffdec.c
patch
|
blob
|
history
diff --git
a/libavformat/riffdec.c
b/libavformat/riffdec.c
index
74f93ac
..
2c43afc
100644
(file)
--- 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);