From: Vinson Lee Date: Thu, 4 Mar 2010 08:41:21 +0000 (-0800) Subject: mesa: Add asserts to check inputs to memcpy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df62b0da92f50b309d79d6552ecdf5a59910c80a;p=mesa.git mesa: Add asserts to check inputs to memcpy. --- diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index e2efe81a8f7..51f7edfab12 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1325,6 +1325,8 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, if (border > 0) { /* fill in dest border */ /* lower-left border pixel */ + assert(dstPtr); + assert(srcPtr); memcpy(dstPtr, srcPtr, bpt); /* lower-right border pixel */ memcpy(dstPtr + (dstWidth - 1) * bpt,