summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-10-01 12:52:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-10-01 12:52:48 (GMT)
commit0ee4b2f57c83341c5896b9abe552e28874292a12 (patch)
tree9bc2b696d5f1dd703e2c0f71eec0ffb13ca67447 /generic/tclObj.c
parentc240909716db63ba2036f34e975de5905b2871dd (diff)
downloadtcl-0ee4b2f57c83341c5896b9abe552e28874292a12.zip
tcl-0ee4b2f57c83341c5896b9abe552e28874292a12.tar.gz
tcl-0ee4b2f57c83341c5896b9abe552e28874292a12.tar.bz2
* generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,
* generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 0aed0c2..58de5d5 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.175 2010/09/27 19:42:38 msofer Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.176 2010/10/01 12:52:49 dkf Exp $
*/
#include "tclInt.h"
@@ -2355,7 +2355,7 @@ UpdateStringOfDouble(
len = strlen(buffer);
objPtr->bytes = (char *) ckalloc((unsigned) len + 1);
- strcpy(objPtr->bytes, buffer);
+ memcpy(objPtr->bytes, buffer, (unsigned) len + 1);
objPtr->length = len;
}
@@ -2551,7 +2551,7 @@ UpdateStringOfInt(
len = TclFormatInt(buffer, objPtr->internalRep.longValue);
objPtr->bytes = ckalloc((unsigned) len + 1);
- strcpy(objPtr->bytes, buffer);
+ memcpy(objPtr->bytes, buffer, (unsigned) len + 1);
objPtr->length = len;
}