swrast: Fix signed/unsigned problems with negative strides.
In swrast_map_renderbuffer negative strides lead to render buffer map pointers that are off by 2^32. Make sure that intermediate negative values are not converted to an unsigned. Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
de93347d48
commit
a4c952f36f
|
@ -419,8 +419,8 @@ swrast_map_renderbuffer(struct gl_context *ctx,
|
||||||
stride = -stride;
|
stride = -stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
map += y * stride;
|
map += (GLsizei)y * stride;
|
||||||
map += x * cpp;
|
map += (GLsizei)x * cpp;
|
||||||
|
|
||||||
*out_map = map;
|
*out_map = map;
|
||||||
*out_stride = stride;
|
*out_stride = stride;
|
||||||
|
|
Loading…
Reference in New Issue