Revision 925aa969 libavcodec/vorbis_dec.c

View differences:

libavcodec/vorbis_dec.c
661 661
        res_setup->partition_size = get_bits(gb, 24) + 1;
662 662
        /* Validations to prevent a buffer overflow later. */
663 663
        if (res_setup->begin>res_setup->end ||
664
            res_setup->end > vc->avccontext->channels * vc->blocksize[1] / (res_setup->type == 2 ? 1 : 2) ||
664
            res_setup->end > vc->avccontext->channels * vc->blocksize[1] / 2 ||
665 665
            (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) {
666 666
            av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %"PRIdFAST16", %"PRIdFAST32", %"PRIdFAST32", %u, %"PRIdFAST32"\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1] / 2);
667 667
            return -1;

Also available in: Unified diff