summaryrefslogtreecommitdiffstats
path: root/generic/tclRegexp.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/tclRegexp.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/tclRegexp.c')
-rw-r--r--generic/tclRegexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 6848960..86ce07c 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclRegexp.c,v 1.34 2010/02/24 10:32:17 dkf Exp $
+ * RCS: @(#) $Id: tclRegexp.c,v 1.35 2010/10/01 12:52:50 dkf Exp $
*/
#include "tclInt.h"
@@ -990,7 +990,7 @@ CompileRegexp(
tsdPtr->regexps[i+1] = tsdPtr->regexps[i];
}
tsdPtr->patterns[0] = ckalloc((unsigned) length+1);
- strcpy(tsdPtr->patterns[0], string);
+ memcpy(tsdPtr->patterns[0], string, (unsigned) length + 1);
tsdPtr->patLengths[0] = length;
tsdPtr->regexps[0] = regexpPtr;