Revision aedc98b0

View differences:

libavcodec/vorbis_dec.c
752 752
        }
753 753

  
754 754
        for(j=0;j<mapping_setup->submaps;++j) {
755
            int bits;
755 756
            skip_bits(gb, 8); // FIXME check?
756
            mapping_setup->submap_floor[j]=get_bits(gb, 8);
757
            mapping_setup->submap_residue[j]=get_bits(gb, 8);
757
            bits=get_bits(gb, 8);
758
            if (bits>=vc->floor_count) {
759
                av_log(vc->avccontext, AV_LOG_ERROR, "submap floor value %d out of range. \n", bits);
760
                return -1;
761
            }
762
            mapping_setup->submap_floor[j]=bits;
763
            bits=get_bits(gb, 8);
764
            if (bits>=vc->residue_count) {
765
                av_log(vc->avccontext, AV_LOG_ERROR, "submap residue value %d out of range. \n", bits);
766
                return -1;
767
            }
768
            mapping_setup->submap_residue[j]=bits;
758 769

  
759 770
            AV_DEBUG("   %d mapping %d submap : floor %d, residue %d \n", i, j, mapping_setup->submap_floor[j], mapping_setup->submap_residue[j]);
760 771
        }

Also available in: Unified diff