aboutsummaryrefslogtreecommitdiff
path: root/libavformat/vqf.c
diff options
context:
space:
mode:
authorMichael Niedermayer2013-09-29 22:42:26 +0200
committerMichael Niedermayer2013-09-29 22:42:31 +0200
commitb24f7cf95070fa71e503069ef288de271258523b (patch)
tree7f2a8522ccd97d46336608e4932623b074eba994 /libavformat/vqf.c
parent554c22c710915845834333cc3c15d449f88e353a (diff)
parent68ff9981283a56c731f00c2ee7901103665092fc (diff)
Merge commit '68ff9981283a56c731f00c2ee7901103665092fc'
* commit '68ff9981283a56c731f00c2ee7901103665092fc': vqf: Make sure the bitrate is in the valid range Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/vqf.c')
-rw-r--r--libavformat/vqf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index cf680ffd4d..be7d8a0a80 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -187,6 +187,13 @@ static int vqf_read_header(AVFormatContext *s)
break;
}
+ if (read_bitrate / st->codec->channels < 8 ||
+ read_bitrate / st->codec->channels > 48) {
+ av_log(s, AV_LOG_ERROR, "Invalid bitrate per channel %d\n",
+ read_bitrate / st->codec->channels);
+ return AVERROR_INVALIDDATA;
+ }
+
switch (((st->codec->sample_rate/1000) << 8) +
read_bitrate/st->codec->channels) {
case (11<<8) + 8 :