summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-10-06 05:52:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-10-06 05:52:20 (GMT)
commit329125679e274130e2405579330bd37c327f39c8 (patch)
treed99cff9d30ee720bbfff62625aec4088cc2a16b7 /generic/tclBinary.c
parent8d980d5957f426b122d14c323065a4d58821ac92 (diff)
downloadtcl-329125679e274130e2405579330bd37c327f39c8.zip
tcl-329125679e274130e2405579330bd37c327f39c8.tar.gz
tcl-329125679e274130e2405579330bd37c327f39c8.tar.bz2
* generic/tclBasic.c:
* generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index faa317e..1b613d8 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.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: tclBinary.c,v 1.20 2004/10/06 00:24:16 dgp Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.21 2004/10/06 05:52:21 dgp Exp $
*/
#include "tclInt.h"
@@ -575,7 +575,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
* character. */
char *format; /* Pointer to current position in format
* string. */
- Tcl_Obj *resultPtr; /* Object holding result buffer. */
+ Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */
unsigned char *buffer; /* Start of result buffer. */
unsigned char *cursor; /* Current position within result buffer. */
unsigned char *maxPos; /* Greatest position within result buffer that