summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-08-09 18:12:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-08-09 18:12:41 (GMT)
commit23337a910dff06fe7f10369619b17a42760935cf (patch)
tree9fa3489cf6f8b02decda80800226ffa5981e6439
parent18500d2958ab58a718a10b5c7f98b2b3f3c398a9 (diff)
downloadtcl-23337a910dff06fe7f10369619b17a42760935cf.zip
tcl-23337a910dff06fe7f10369619b17a42760935cf.tar.gz
tcl-23337a910dff06fe7f10369619b17a42760935cf.tar.bz2
* generic/tclEncoding.c: Replace buffer copy in for loop
with call to memcpy(). Thanks to afredd. [Patch 1530262]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclEncoding.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e9a23c..66eea53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-09 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclEncoding.c: Replace buffer copy in for loop
+ with call to memcpy(). Thanks to afredd. [Patch 1530262]
+
2006-08-03 Daniel Steffen <das@users.sourceforge.net>
* unix/tclUnixPipe.c (TclpCreateProcess): for USE_VFORK: ensure standard
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 2a3698f..5b2ae19 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.16.2.10 2006/04/05 00:06:02 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.16.2.11 2006/08/09 18:12:42 dgp Exp $
*/
#include "tclInt.h"
@@ -1882,9 +1882,7 @@ BinaryProc(clientData, src, srcLen, flags, statePtr, dst, dstLen,
*srcReadPtr = srcLen;
*dstWrotePtr = srcLen;
*dstCharsPtr = srcLen;
- for ( ; --srcLen >= 0; ) {
- *dst++ = *src++;
- }
+ memcpy((void *) dst, (void *) src, (size_t) srcLen);
return result;
}