util/u_vbuf: correct map offset calculation for crazy offsets
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 23 Jan 2014 02:30:07 +0000 (21:30 -0500)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 27 Jan 2014 15:40:42 +0000 (16:40 +0100)
commit45b64e52f4df49ac01ac100fba2c01633d492a6d
tree6204625d68f8e6fcf16bfe308a8d98ef622de70e
parent3de97ce9200e9fe96891e7e92ec83f0fc38d8693
util/u_vbuf: correct map offset calculation for crazy offsets

When the min_index is very large (or very negative), the multipliation
can overflow 32 bits and result in an incorrect map pointer
modification.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_vbuf.c