diff --git a/media/libvorbis/lib/vorbis_psy.c b/media/libvorbis/lib/vorbis_psy.c index 036b094aa763..96213c424954 100644 --- a/media/libvorbis/lib/vorbis_psy.c +++ b/media/libvorbis/lib/vorbis_psy.c @@ -339,6 +339,10 @@ void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi, if(halfoc<0)halfoc=0; if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; + /*If we hit the P_BANDS-1 clamp above, inthalfoc+1 will be out of bounds, + even though it will have an interpolation weight of 0. + Shift the interval so we don't read past the end of the array.*/ + if(inthalfoc>=P_BANDS-2)inthalfoc=P_BANDS-2; del=halfoc-inthalfoc; for(j=0;jdec_firsttablen); + ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)codelist[lo+1]<=word)lo++; while( hi=(c->codelist[hi]&mask))hi++; @@ -581,7 +581,7 @@ void run_test(static_codebook *b,float *comp){ exit(1); } } - free(out); + _ogg_free(out); } int main(){ diff --git a/media/libvorbis/moz.yaml b/media/libvorbis/moz.yaml index 1778f2a30baa..4c8bf07ca570 100644 --- a/media/libvorbis/moz.yaml +++ b/media/libvorbis/moz.yaml @@ -10,8 +10,8 @@ origin: url: https://xiph.org/vorbis/ - release: v1.3.7 (2020-07-03T19:38:28-07:00). - revision: v1.3.7 + release: 315da9cc9d30484c802b2e2ea150df39e060e2b9 (2025-02-05T08:11:19.000-08:00). + revision: 315da9cc9d30484c802b2e2ea150df39e060e2b9 license: BSD-3-Clause