summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-01-25 22:00:59 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-01-25 22:00:59 (GMT)
commitf67cc2dfbb28c39d35ed3efe4c325792a7f68e92 (patch)
tree6fd938162b644bab271af5249900538d9245cefc
parent0fa12e5e106775299d665a53c1c08b868626141b (diff)
downloadtk-f67cc2dfbb28c39d35ed3efe4c325792a7f68e92.zip
tk-f67cc2dfbb28c39d35ed3efe4c325792a7f68e92.tar.gz
tk-f67cc2dfbb28c39d35ed3efe4c325792a7f68e92.tar.bz2
Bug-2433260: non-critical error in Tk_PhotoPutBlock
FossilOrigin-Name: a2b769a6912891e498b1645b9877c1e98aa93ebc
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkImgPhoto.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 39f028a..dcbc39f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-25 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkImgPhoto.c: [Bug 2433260]: non-critical error in
+ Tk_PhotoPutBlock
+
2011-11-22 Jan Nijtmans <nijtmans@users.sf.net>
* doc/wish.1: Use the same shebang comment everywhere.
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 3f439de..80b44d7 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -4406,7 +4406,7 @@ Tk_PhotoPutBlock(handle, blockPtr, x, y, width, height, compRule)
/*
* Copy the data into our local 32-bit/pixel array.
- * If we can do it with a single memcpy, we do.
+ * If we can do it with a single memmove, we do.
*/
destLinePtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4;
@@ -4414,7 +4414,7 @@ Tk_PhotoPutBlock(handle, blockPtr, x, y, width, height, compRule)
/*
* This test is probably too restrictive. We should also be able to
- * do a memcpy if pixelSize == 3 and alphaOffset == 0. Maybe other cases
+ * do a memmove if pixelSize == 3 and alphaOffset == 0. Maybe other cases
* too.
*/
if ((blockPtr->pixelSize == 4)
@@ -4423,7 +4423,7 @@ Tk_PhotoPutBlock(handle, blockPtr, x, y, width, height, compRule)
&& ((height == 1) || ((x == 0) && (width == masterPtr->width)
&& (blockPtr->pitch == pitch)))
&& (compRule == TK_PHOTO_COMPOSITE_SET)) {
- memcpy((VOID *) destLinePtr,
+ memmove((VOID *) destLinePtr,
(VOID *) (blockPtr->pixelPtr + blockPtr->offset[0]),
(size_t) (height * width * 4));
} else {