draw: check for integer overflows in instance computation
authorZack Rusin <zackr@vmware.com>
Tue, 25 Jun 2013 21:01:14 +0000 (17:01 -0400)
committerZack Rusin <zackr@vmware.com>
Fri, 28 Jun 2013 08:24:20 +0000 (04:24 -0400)
commit88de009cc1ab838cd87416dcbbaa4f5b30173c71
tree6f07591ed07dc76c7a202d90252f280cb6b6ec66
parent2f13f28120fdfe2f5a64e87b4ec19db94bf63713
draw: check for integer overflows in instance computation

Integers could easily overflow is the starting instance
was large enough. Instead of letting bogus counts through
set the instance to max if it overflown and let our
regular buffer overflow computation handle it.

Signed-off-by: Zack Rusin <zackr@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_pt.c