From: Vinson Lee Date: Tue, 23 Feb 2010 08:19:30 +0000 (-0800) Subject: mesa: Assert that array index is not negative. X-Git-Tag: mesa-7.8~556 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abcb6b6d01c253627363a05205291630b5247018;p=platform%2Fupstream%2Fmesa.git mesa: Assert that array index is not negative. --- diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index 71e40dd..149853f 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -528,6 +528,7 @@ fxt1_lloyd (GLfloat vec[][MAX_COMP], GLint nv, #else GLint best = fxt1_bestcol(vec, nv, input[k], nc, &err); #endif + assert(best >= 0); /* add in closest color */ for (i = 0; i < nc; i++) { sum[best][i] += input[k][i];