draw: account for elem size when computing overflow 09/7309/1
authorZack Rusin <zackr@vmware.com>
Tue, 25 Jun 2013 17:54:47 +0000 (13:54 -0400)
committerZack Rusin <zackr@vmware.com>
Fri, 28 Jun 2013 08:24:12 +0000 (04:24 -0400)
commite742f7788ea6f2c1a4e1071a2d53eef5939e501b
tree29f126ecedcbf4da4c3c138e08d6d97522e4f6b8
parent7214fe3cc4cf5f08092e6eb8980eb1d56a84cdd3
draw: account for elem size when computing overflow

We weren't taking into account the size of element
that is to be fetched, which meant that it was possible
to overflow the buffer reads if the stride was very
close to the end of the buffer, e.g. stride = 3, buffer
size = 4, and the element to be read = 4. This should
be properly detected as an overflow.

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