Cap array elements at 0 when passed an invalid pointer for an array object.
authorEric Anholt <eric@anholt.net>
Wed, 25 Feb 2009 19:57:44 +0000 (11:57 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 7 Jul 2009 22:16:28 +0000 (15:16 -0700)
commit058e96916b1ee661dfc16052b79b3aa9fcb47690
tree533a7c9711e2aef13baee43357c67e231ebded47
parent28471cfa970702128d822c2ecbb1703eedbca245
Cap array elements at 0 when passed an invalid pointer for an array object.

Otherwise, a pointer greater than the size would underflow and give a large
maximum element.

Reviewed-by: Brian Paul <brianp@vmware.com> (previous version)
src/mesa/main/state.c