mesa: Add asserts to check inputs to memcpy.

This commit is contained in:
Vinson Lee
2010-03-02 01:01:23 -08:00
parent 8bf5c229f3
commit 247008f6c2
+2
View File
@@ -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,