summaryrefslogtreecommitdiff
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 5f6fb29b5f..bfac309086 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2165,7 +2165,7 @@ _mesa_validate_pbo_compressed_teximage(GLcontext *ctx,
return pixels;
}
if ((const GLubyte *) pixels + imageSize >
- (const GLubyte *)(uintptr_t) packing->BufferObj->Size) {
+ ((const GLubyte *) 0) + packing->BufferObj->Size) {
/* out of bounds read! */
_mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access");
return NULL;