diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-01-25 22:07:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-01-25 22:07:33 (GMT) |
commit | 7b67c9d7fc26e929fe3696b840dce11a5d8ed25b (patch) | |
tree | d3d3d3f7e0691e127c233bce6fb18386d26d6b28 | |
parent | 46267816a60dcc5b28731afdb60044f9057ba346 (diff) | |
parent | 9db0574438d863621647428db163a9720fa1428c (diff) | |
download | tk-7b67c9d7fc26e929fe3696b840dce11a5d8ed25b.zip tk-7b67c9d7fc26e929fe3696b840dce11a5d8ed25b.tar.gz tk-7b67c9d7fc26e929fe3696b840dce11a5d8ed25b.tar.bz2 |
Bug-2433260: non-critical error in Tk_PhotoPutBlock
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2012-01-25 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tkImgPhoto.c: [Bug 2433260]: non-critical error in + Tk_PhotoPutBlock + 2012-01-25 Francois Vogel <fvogelnew1@free.fr> * generic/tkText.c: Don't increase the epoch twice diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index a833e29..7d8bf0d 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -2682,7 +2682,7 @@ Tk_PhotoPutBlock( /* * Copy the data into our local 32-bit/pixel array. If we can do it with a - * single memcpy, we do. + * single memmove, we do. */ destLinePtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4; @@ -2690,7 +2690,7 @@ Tk_PhotoPutBlock( /* * Test to see if we can do the whole write in a single copy. This test is - * probably too restrictive. We should also be able to do a memcpy if + * probably too restrictive. We should also be able to do a memmove if * pixelSize == 3 and alphaOffset == 0. Maybe other cases too. */ @@ -2700,7 +2700,7 @@ Tk_PhotoPutBlock( && ((height == 1) || ((x == 0) && (width == masterPtr->width) && (blockPtr->pitch == pitch))) && (compRule == TK_PHOTO_COMPOSITE_SET)) { - memcpy(destLinePtr, blockPtr->pixelPtr + blockPtr->offset[0], + memmove(destLinePtr, blockPtr->pixelPtr + blockPtr->offset[0], (size_t) (height * width * 4)); /* |