projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfdee9c
)
mesa: Add asserts to check inputs to memcpy.
author
Vinson Lee
<vlee@vmware.com>
Sun, 28 Feb 2010 04:11:31 +0000
(20:11 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 28 Feb 2010 04:11:31 +0000
(20:11 -0800)
src/mesa/main/mipmap.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/mipmap.c
b/src/mesa/main/mipmap.c
index 89b8c5a3563d24102c7cc89290a7cf3a089cc254..21ee317a3185339a1d469c39b94974841db845cf 100644
(file)
--- 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(dstPtr);
assert(srcPtr);
memcpy(dstPtr, srcPtr, bpt);
/* copy right-most pixel from source */
@@
-1026,6
+1027,8
@@
make_2d_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,