[Piglit] [PATCH] texwrap: Fix out-of-bounds read.

Vinson Lee vlee at freedesktop.org
Wed Jan 23 22:57:07 PST 2013


Fixes out-of-bounds read defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/texturing/texwrap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
index 0a460d9..5ef33ee 100644
--- a/tests/texturing/texwrap.c
+++ b/tests/texturing/texwrap.c
@@ -1279,7 +1279,7 @@ static void get_int_border_color(const struct format_desc *format,
 			uresult[i] = border[i] * (double)((1ull << bits)-1);
 		}
 		if (bits == 10) {
-			uresult[3] = border[i] * (double)3;
+			uresult[3] = border[3] * (double)3;
 		}
 	}
 }
-- 
1.8.1



More information about the Piglit mailing list