diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-10-01 12:52:48 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-10-01 12:52:48 (GMT) |
commit | 3dd93575aa3c2b6cdf2f544073076f285d3e23a9 (patch) | |
tree | 9bc2b696d5f1dd703e2c0f71eec0ffb13ca67447 /generic/tclEncoding.c | |
parent | 2a45ec67528094a5b6b09f49001fafad13b28cee (diff) | |
download | tcl-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/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 11e0c9c..add30e4 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.72 2010/09/16 14:49:37 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.73 2010/10/01 12:52:49 dkf Exp $ */ #include "tclInt.h" @@ -2019,9 +2019,9 @@ LoadEscapeEncoding( + Tcl_DStringLength(&escapeData); dataPtr = (EscapeEncodingData *) ckalloc(size); dataPtr->initLen = strlen(init); - strcpy(dataPtr->init, init); + memcpy(dataPtr->init, init, (unsigned) dataPtr->initLen + 1); dataPtr->finalLen = strlen(final); - strcpy(dataPtr->final, final); + memcpy(dataPtr->final, final, (unsigned) dataPtr->finalLen + 1); dataPtr->numSubTables = Tcl_DStringLength(&escapeData) / sizeof(EscapeSubTable); memcpy(dataPtr->subTables, Tcl_DStringValue(&escapeData), |