From cec716e69b148d89a937ddb0a055c08937dade8f Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Nov 2009 16:31:15 +0000 Subject: * generic/tclClock.c (TclClockInit): Do not create [clock] support commands in safe interps. --- ChangeLog | 3 +++ generic/tclClock.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 26c1c6d..84294cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-11-12 Don Porter + * generic/tclClock.c (TclClockInit): Do not create [clock] support + commands in safe interps. + * tests/io.test: New test io-53.11 to test for [Bug 2895565]. 2009-11-11 Pat Thoyts diff --git a/generic/tclClock.c b/generic/tclClock.c index b123748..7df1759 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.66.2.2 2008/06/17 17:21:38 andreas_kupries Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.66.2.3 2009/11/12 16:31:15 dgp Exp $ */ #include "tclInt.h" @@ -256,6 +256,15 @@ TclClockInit( int i; /* + * Safe interps get [::clock] as alias to a master, so do not need their + * own copies of the support routines. + */ + + if (Tcl_IsSafe(interp)) { + return; + } + + /* * Create the client data, which is a refcounted literal pool. */ -- cgit v0.12