aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-08-06 22:20:25 +0200
committerChristoph Bumiller <[email protected]>2013-08-06 22:29:33 +0200
commit2daf974cfe701f5955b96b51478ca545c4a5082c (patch)
tree283b6cc53a778c73a75266c7b14b37ac827e45c5 /src/gallium/drivers/nvc0
parent07c8f7a6f8dfe724c1ae92ec45dd04532b6fd453 (diff)
nvc0: don't access array out of bounds on unexpected sample count
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c3
1 files changed, 1 insertions, 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;