From: Vinson Lee Date: Sun, 28 Feb 2010 01:19:31 +0000 (-0800) Subject: mesa: Add assert to check input to memcpy is not null. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfdee9cc70f21ef34ca8497d30ab72106ce43bd1;p=mesa.git mesa: Add assert to check input to memcpy is not null. --- diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 355af56b411..89b8c5a3563 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -979,6 +979,7 @@ make_1d_mipmap(GLenum datatype, GLuint comps, GLint border, if (border) { /* copy left-most pixel from source */ + assert(srcPtr); memcpy(dstPtr, srcPtr, bpt); /* copy right-most pixel from source */ memcpy(dstPtr + (dstWidth - 1) * bpt,