summaryrefslogtreecommitdiffstats
path: root/src/glx/compsize.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-02-13 16:58:35 -0800
committerKenneth Graunke <[email protected]>2016-02-13 21:12:18 -0800
commit565aa69970ccb0e92c9d5773c43d9b49e7bdb8e4 (patch)
tree0075951ad7b4d96a4d5010ea6712ff82a9810ce5 /src/glx/compsize.c
parent6411444c364f67a4a597f8e025c9025440aa054a (diff)
glsl: Fix overflow of ImageAccess[] array.
The ImageAccess array is statically sized to MAX_IMAGE_UNIFORMS: GLenum ImageAccess[MAX_IMAGE_UNIFORMS]; There was no bounds checking ensuring we don't overflow. Passing in a shader with too many uniforms would cause writes to extend into other fields, such as sh->NumImages. Later linker checks already handle reporting an error when there are too many images, so just avoid corrupting structures here. This rearranges the logic a bit to look more like the sampler case. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Tested-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glx/compsize.c')
0 files changed, 0 insertions, 0 deletions