summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2004-10-06 05:52:20 (GMT)
committerdgp@users.sourceforge.net <dgp>2004-10-06 05:52:20 (GMT)
commit0e746c397711266830f0b7ad8a4f2dd4a0a3e08d (patch)
treed99cff9d30ee720bbfff62625aec4088cc2a16b7 /generic/tclBinary.c
parent69e71655357cefe5a431a05aa04ec8aa5075bd5d (diff)
downloadtcl-0e746c397711266830f0b7ad8a4f2dd4a0a3e08d.zip
tcl-0e746c397711266830f0b7ad8a4f2dd4a0a3e08d.tar.gz
tcl-0e746c397711266830f0b7ad8a4f2dd4a0a3e08d.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