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 | 0ee4b2f57c83341c5896b9abe552e28874292a12 (patch) | |
tree | 9bc2b696d5f1dd703e2c0f71eec0ffb13ca67447 /generic/tclEncoding.c | |
parent | c240909716db63ba2036f34e975de5905b2871dd (diff) | |
download | tcl-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/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), |