diff options
author | Chad Versace <[email protected]> | 2012-01-18 15:56:58 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2012-01-23 17:44:52 -0800 |
commit | aed5c8299fe47b8e1728f8140d069bc89d3fa947 (patch) | |
tree | 4b1e18830b2e00dcbd9dda73f6967b7f88115ee6 /src/gallium/drivers/r600/r600_shader.c | |
parent | b48d4b64e97f48dcf0aef1b6f7bc333c309cc183 (diff) |
swrast: Fix unsigned promotion in pointer arithmetic
When rowstride was negatie, unsigned promotion caused a segfault here:
299│ if (rb->Format == MESA_FORMAT_S8) {
300│ const GLuint rowStride = rb->RowStride;
301│ for (i = 0; i < count; i++) {
302│ if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
303├> stencil[i] = *(map + y[i] * rowStride + x[i]);
304│ }
305│ }
306│ }
Fixes segfault in oglconform
separatestencil-neu(NonPolygon.BothFacesBitmapCoreAPI),
though test still fails.
Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
0 files changed, 0 insertions, 0 deletions