diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-30 00:42:26 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-30 00:42:31 +0400 |
commit | b24f7cf95070fa71e503069ef288de271258523b (patch) | |
tree | 7f2a8522ccd97d46336608e4932623b074eba994 /libavformat | |
parent | 554c22c710915845834333cc3c15d449f88e353a (diff) | |
parent | 68ff9981283a56c731f00c2ee7901103665092fc (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')
-rw-r--r-- | libavformat/vqf.c | 7 |
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 : |