From 247008f6c2014c8f84de3a27ac954afe2c418a93 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 2 Mar 2010 01:01:23 -0800 Subject: mesa: Add asserts to check inputs to memcpy. --- src/mesa/main/mipmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 21ee317a31..e2efe81a8f 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1269,6 +1269,8 @@ make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, if (border) { /* copy left-most pixel from source */ + assert(dstPtr); + assert(srcPtr); memcpy(dstPtr, srcPtr, bpt); /* copy right-most pixel from source */ memcpy(dstPtr + (dstWidth - 1) * bpt, -- cgit v1.2.3