summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 02f2dbe69fe..e4c3f6651d6 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2127,7 +2127,7 @@ _mesa_validate_pbo_compressed_teximage(GLcontext *ctx,
return pixels;
}
if ((const GLubyte *) pixels + imageSize >
- (const GLubyte *) packing->BufferObj->Size) {
+ (const GLubyte *)(uintptr_t) packing->BufferObj->Size) {
/* out of bounds read! */
_mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access");
return NULL;