st/mesa: use signed temporary variable to store _ColorDrawBufferIndexes
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 15 Jan 2014 11:39:24 +0000 (11:39 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 15 Jan 2014 14:33:28 +0000 (14:33 +0000)
commitbfcf78c1101a1cbcdd9a479722203047c8d6c26a
treee71e4aa3f053e543140ab5e8a09b7bf3528fa156
parent3515a648a95134e04234f98d6630c2067069f1d6
st/mesa: use signed temporary variable to store _ColorDrawBufferIndexes

The temporary variable used to store _ColorDrawBufferIndexes must be
signed (GLint), otherwise the following conditional will be incorrectly
evaluated. Leading to crashes in the driver/mesa or accessing/writing
to arbitrary memory location. The bug dates back to 2009.

Cc: 10.0 9.2 9.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/mesa/state_tracker/st_cb_clear.c