draw: check for an integer overflow when computing stride
authorZack Rusin <zackr@vmware.com>
Tue, 25 Jun 2013 20:14:06 +0000 (16:14 -0400)
committerZack Rusin <zackr@vmware.com>
Fri, 28 Jun 2013 08:24:16 +0000 (04:24 -0400)
commit2f13f28120fdfe2f5a64e87b4ec19db94bf63713
treec30e81d22420c8dd1e594081a821eeb7a0e804be
parente742f7788ea6f2c1a4e1071a2d53eef5939e501b
draw: check for an integer overflow when computing stride

Our buffer overflow arithmetic was susceptible to integer
overflows which was the buffer overflow logic to break.
Lets use the llvm overflow intrinsics to check for integer
overflows while computing the stride/needed buffer size.

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