summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-10-01 13:34:09 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-10-01 13:34:09 (GMT)
commit1b1d8617a95c45a5348cc37ec96e85dba77cff28 (patch)
tree744dee9e5f71658488ec833897ab66be3529e065 /generic/tclNamesp.c
parente4330954164421336f3ea7141c105f8af0281e88 (diff)
downloadtcl-1b1d8617a95c45a5348cc37ec96e85dba77cff28.zip
tcl-1b1d8617a95c45a5348cc37ec96e85dba77cff28.tar.gz
tcl-1b1d8617a95c45a5348cc37ec96e85dba77cff28.tar.bz2
merge
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 6961fd5..372d978 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -22,7 +22,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.212 2010/08/30 14:02:10 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.212.2.1 2010/10/01 13:34:09 kennykb Exp $
*/
#include "tclInt.h"
@@ -706,8 +706,9 @@ Tcl_CreateNamespace(
*/
nsPtr = (Namespace *) ckalloc(sizeof(Namespace));
- nsPtr->name = ckalloc((unsigned) (strlen(simpleName)+1));
- strcpy(nsPtr->name, simpleName);
+ nameLen = strlen(simpleName) + 1;
+ nsPtr->name = ckalloc((unsigned) nameLen);
+ memcpy(nsPtr->name, simpleName, nameLen);
nsPtr->fullName = NULL; /* Set below. */
nsPtr->clientData = clientData;
nsPtr->deleteProc = deleteProc;