Mesa (master): mesa: Add assert to check input to memcpy is not null.

Vinson Lee vlee at kemper.freedesktop.org
Sun Feb 28 01:20:44 UTC 2010


Module: Mesa
Branch: master
Commit: bfdee9cc70f21ef34ca8497d30ab72106ce43bd1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfdee9cc70f21ef34ca8497d30ab72106ce43bd1

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Feb 27 17:19:31 2010 -0800

mesa: Add assert to check input to memcpy is not null.

---

 src/mesa/main/mipmap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 355af56..89b8c5a 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,




More information about the mesa-commit mailing list