summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.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)
commit3dd93575aa3c2b6cdf2f544073076f285d3e23a9 (patch)
tree9bc2b696d5f1dd703e2c0f71eec0ffb13ca67447 /generic/tclResult.c
parent2a45ec67528094a5b6b09f49001fafad13b28cee (diff)
downloadtcl-3dd93575aa3c2b6cdf2f544073076f285d3e23a9.zip
tcl-3dd93575aa3c2b6cdf2f544073076f285d3e23a9.tar.gz
tcl-3dd93575aa3c2b6cdf2f544073076f285d3e23a9.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/tclResult.c')
-rw-r--r--generic/tclResult.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 18aae6c..ee15190 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.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: tclResult.c,v 1.62 2010/09/22 00:57:11 hobbs Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.63 2010/10/01 12:52:50 dkf Exp $
*/
#include "tclInt.h"
@@ -436,7 +436,7 @@ Tcl_SetResult(
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
}
- strcpy(iPtr->result, result);
+ memcpy(iPtr->result, result, (unsigned) length+1);
} else {
iPtr->result = (char *) result;
iPtr->freeProc = freeProc;