mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
nvc0: don't access array out of bounds on unexpected sample count
This commit is contained in:
parent
07c8f7a6f8
commit
2daf974cfe
1 changed files with 1 additions and 2 deletions
|
|
@ -394,8 +394,7 @@ nvc0_context_get_sample_position(struct pipe_context *pipe,
|
||||||
case 8: ptr = ms8; break;
|
case 8: ptr = ms8; break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
ptr = ms1;
|
return; /* bad sample count -> undefined locations */
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
xy[0] = ptr[sample_index][0] * 0.0625f;
|
xy[0] = ptr[sample_index][0] * 0.0625f;
|
||||||
xy[1] = ptr[sample_index][1] * 0.0625f;
|
xy[1] = ptr[sample_index][1] * 0.0625f;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue