From: José Fonseca Date: Tue, 30 Dec 2008 20:10:24 +0000 (+0000) Subject: draw: Avoid integer overflow converting pointers on 64bit archs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f24bc698412b4635422a52f9d7073ce7854dceb;p=mesa.git draw: Avoid integer overflow converting pointers on 64bit archs. Not really an error, as we only care for the lower 4 bits. --- diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index 7f305304ff7..c057cd67fde 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -50,7 +50,7 @@ void draw_vs_set_constants( struct draw_context *draw, const float (*constants)[4], unsigned size ) { - if (((unsigned)constants) & 0xf) { + if (((uintptr_t)constants) & 0xf) { if (size > draw->vs.const_storage_size) { if (draw->vs.aligned_constant_storage) align_free((void *)draw->vs.aligned_constant_storage);