From eb57c519c1abf697b517e104df59e75aa8b09025 Mon Sep 17 00:00:00 2001 From: Tim Terriberry Date: Thu, 21 Oct 2010 18:14:51 +0000 Subject: 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 --- floor1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'floor1.c') diff --git a/floor1.c b/floor1.c index a408392..a013552 100644 --- a/floor1.c +++ b/floor1.c @@ -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;jposts;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; -- cgit v1.2.1