From 2daf974cfe701f5955b96b51478ca545c4a5082c Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Tue, 6 Aug 2013 22:20:25 +0200 Subject: nvc0: don't access array out of bounds on unexpected sample count --- src/gallium/drivers/nvc0/nvc0_context.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c index 69e1970b64e..5da491f14e9 100644 --- a/src/gallium/drivers/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nvc0/nvc0_context.c @@ -394,8 +394,7 @@ nvc0_context_get_sample_position(struct pipe_context *pipe, case 8: ptr = ms8; break; default: assert(0); - ptr = ms1; - break; + return; /* bad sample count -> undefined locations */ } xy[0] = ptr[sample_index][0] * 0.0625f; xy[1] = ptr[sample_index][1] * 0.0625f; -- cgit v1.2.3