aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbisdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-11 21:04:46 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-12 20:32:08 +0200
commit4561feb4bfa6891be17761ac6ce6d6f9fd8f1858 (patch)
tree228027d5efce0f2c7ec865e8fc14a40453b3d1f5 /libavcodec/vorbisdec.c
parentd1a58afb95f68c5375b4a7556317d835108509ed (diff)
downloadffmpeg-4561feb4bfa6891be17761ac6ce6d6f9fd8f1858.tar.gz
vorbisdec: use correct channels variable.
All code should use the local variable, the AVCodecContext might not yet have the updated value. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r--libavcodec/vorbisdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 2bdb118a7d..ddc79fcc43 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -687,7 +687,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context *vc)
res_setup->partition_size = get_bits(gb, 24) + 1;
/* Validations to prevent a buffer overflow later. */
if (res_setup->begin>res_setup->end ||
- res_setup->end > (res_setup->type == 2 ? vc->avccontext->channels : 1) * vc->blocksize[1] / 2 ||
+ res_setup->end > (res_setup->type == 2 ? vc->audio_channels : 1) * vc->blocksize[1] / 2 ||
(res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) {
av_log(vc->avccontext, AV_LOG_ERROR,
"partition out of bounds: type, begin, end, size, blocksize: %"PRIu16", %"PRIu32", %"PRIu32", %u, %"PRIu32"\n",