summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-05-09 13:08:18 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-05-09 13:08:18 (GMT)
commitd51857ebee06efd6c8b787e97a2cc344cd5f74b1 (patch)
treeb4cfe068d79d7fc9cc61806e4b0147652d913ff4
parent7eadd008a5eb03994833d4c34bb9d9fe5fccfa65 (diff)
downloadtcl-d51857ebee06efd6c8b787e97a2cc344cd5f74b1.zip
tcl-d51857ebee06efd6c8b787e97a2cc344cd5f74b1.tar.gz
tcl-d51857ebee06efd6c8b787e97a2cc344cd5f74b1.tar.bz2
The array of strings passed to Tcl_GetIndexFromObj must be NULL terminated.
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclCmdMZ.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f13893..ec06dfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-09 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * generic/tclCmdMZ.c (Tcl_ReturnObjCmd): The array of strings
+ passed to Tcl_GetIndexFromObj must be NULL terminated. [Bug 735186]
+ Thanks to Joe Mistachkin for spotting this.
+
2003-05-07 Donal K. Fellows <fellowsd@cs.man.ac.uk>
* doc/trace.n: Fixed very strange language in the documentation
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 079ef15..0716793 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.88 2003/05/07 21:15:44 dkf Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.89 2003/05/09 13:08:19 dkf Exp $
*/
#include "tclInt.h"
@@ -999,7 +999,7 @@ Tcl_ReturnObjCmd(dummy, interp, objc, objv)
Tcl_DictObjGet(NULL, iPtr->returnOpts, iPtr->returnCodeKey, &valuePtr);
if (TCL_ERROR == Tcl_GetIntFromObj(NULL, valuePtr, &code)) {
static CONST char *returnCodes[] = {
- "ok", "error", "return", "break", "continue"
+ "ok", "error", "return", "break", "continue", NULL
};
if (TCL_ERROR == Tcl_GetIndexFromObj(NULL, valuePtr, returnCodes,