Commit eb57c519 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

Port r17543 from Tremor.

A codebook that allows values outside the circular range of the piecewise
 floor1 representation can overflow the lookup
Also fix a typo in the comments of the original patch.


git-svn-id: https://svn.xiph.org/trunk/Tremor@17555 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 285149a6
......@@ -425,7 +425,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
int hx=0;
int lx=0;
int ly=fit_value[0]*info->mult;
/* guard lookup against out-of-rage values */
/* guard lookup against out-of-range values */
ly=(ly<0?0:ly>255?255:ly);
for(j=1;j<look->posts;j++){
......@@ -435,10 +435,9 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
hx=info->postlist[current];
hy*=info->mult;
/* guard lookup against out-of-rage values */
/* guard lookup against out-of-range values */
hy=(hy<0?0:hy>255?255:hy);
render_line(n,lx,hx,ly,hy,out);
lx=hx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment