On Sat, 2016-02-13 at 17:27 -0800, Kenneth Graunke wrote:
> 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: Timothy Arceri <[email protected]>
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to