summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-12-05 22:27:00 (GMT)
committernijtmans <nijtmans>2010-12-05 22:27:00 (GMT)
commitaaf249e2a83d00881890e2bba9bc1ede29309179 (patch)
treeae502d94f6daacc8ac7743e389dd36dd0fe2081b /generic/tclCmdMZ.c
parent65b034684f4c5d543f928aa9a81c238291dd74d1 (diff)
downloadtcl-aaf249e2a83d00881890e2bba9bc1ede29309179.zip
tcl-aaf249e2a83d00881890e2bba9bc1ede29309179.tar.gz
tcl-aaf249e2a83d00881890e2bba9bc1ede29309179.tar.bz2
[Bug 3127687] Triggers FORTIFY_SOURCE buffer overflow detection
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 753f0c1..ee1f128 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.32 2010/04/06 07:45:56 vasiljevic Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.33 2010/12/05 22:27:00 nijtmans Exp $
*/
#include "tclInt.h"
@@ -3340,7 +3340,7 @@ TclTraceExecutionObjCmd(interp, optionIndex, objc, objv)
flags |= (TCL_TRACE_ENTER_EXEC |
TCL_TRACE_LEAVE_EXEC);
}
- strcpy(tcmdPtr->command, command);
+ memcpy(tcmdPtr->command, command, length + 1);
name = Tcl_GetString(objv[3]);
if (Tcl_TraceCommand(interp, name, flags, TraceCommandProc,
(ClientData) tcmdPtr) != TCL_OK) {
@@ -3572,7 +3572,7 @@ TclTraceCommandObjCmd(interp, optionIndex, objc, objv)
tcmdPtr->length = length;
tcmdPtr->refCount = 1;
flags |= TCL_TRACE_DELETE;
- strcpy(tcmdPtr->command, command);
+ memcpy(tcmdPtr->command, command, length + 1);
name = Tcl_GetString(objv[3]);
if (Tcl_TraceCommand(interp, name, flags, TraceCommandProc,
(ClientData) tcmdPtr) != TCL_OK) {
@@ -3791,7 +3791,7 @@ TclTraceVariableObjCmd(interp, optionIndex, objc, objv)
}
tvarPtr->length = length;
flags |= TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT;
- strcpy(tvarPtr->command, command);
+ memcpy(tvarPtr->command, command, length + 1);
name = Tcl_GetString(objv[3]);
flagMask = TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY;
varPtr = TclLookupVar(interp, name, NULL,