summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2009-02-06 00:59:59 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2009-02-06 00:59:59 (GMT)
commitfad852b20196ac0d2093a7c6dcfca1b24fcdd7de (patch)
treeeb8a7ba5cf1e96616aadf62b2dc5a9d7db0e1df8
parentb29f3df591b0bc0c7cdeba75727b7005e7cd6235 (diff)
downloadtcl-fad852b20196ac0d2093a7c6dcfca1b24fcdd7de.zip
tcl-fad852b20196ac0d2093a7c6dcfca1b24fcdd7de.tar.gz
tcl-fad852b20196ac0d2093a7c6dcfca1b24fcdd7de.tar.bz2
Fix for [Bug 2544618]
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclInterp.c12
-rw-r--r--unix/Makefile.in26
3 files changed, 26 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c5e47b..4b6422a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-05 Joe Mistachkin <joe@mistachkin.com>
+
+ * generic/tclInterp.c: Fix argument checking for [interp cancel]. [Bug
+ 2544618]
+ * unix/Makefile.in: Fix build issue with zlib on FreeBSD (and possibly
+ other platforms).
+
2009-02-05 Donal K. Fellows <dkf@users.sf.net>
* generic/tclCmdMZ.c (StringIndexCmd, StringRangeCmd, StringLenCmd):
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index c6b53c0..643b7e0 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.102 2009/02/02 06:02:41 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.103 2009/02/06 01:00:00 mistachkin Exp $
*/
#include "tclInt.h"
@@ -652,11 +652,6 @@ Tcl_InterpObjCmd(
OPT_UNWIND, OPT_LAST
};
- if (objc > 6) {
- Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?");
- return TCL_ERROR;
- }
-
flags = 0;
for (i = 2; i < objc; i++) {
@@ -684,6 +679,11 @@ Tcl_InterpObjCmd(
endOfForLoop:
+ if ((i + 2) < objc) {
+ Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?");
+ return TCL_ERROR;
+ }
+
/*
* Did they specify a slave interp to cancel the script in
* progress in? If not, use the current interp.
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 5dd34f7..df10a4e 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.261 2009/01/20 03:38:01 kennykb Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.262 2009/02/06 01:00:00 mistachkin Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -1576,29 +1576,29 @@ waitpid.o: $(COMPAT_DIR)/waitpid.c
# For building zlib, only used in some build configurations
Zadler32.o: $(ZLIB_DIR)/adler32.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/adler32.c
Zcompress.o: $(ZLIB_DIR)/compress.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/compress.c
Zcrc32.o: $(ZLIB_DIR)/crc32.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/crc32.c
Zdeflate.o: $(ZLIB_DIR)/deflate.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/deflate.c
Zgzio.o: $(ZLIB_DIR)/gzio.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/gzio.c
Zinfback.o: $(ZLIB_DIR)/infback.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/infback.c
Zinffast.o: $(ZLIB_DIR)/inffast.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inffast.c
Zinflate.o: $(ZLIB_DIR)/inflate.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inflate.c
Zinftrees.o: $(ZLIB_DIR)/inftrees.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inftrees.c
Ztrees.o: $(ZLIB_DIR)/trees.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/trees.c
Zuncompr.o: $(ZLIB_DIR)/uncompr.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/uncompr.c
Zzutil.o: $(ZLIB_DIR)/zutil.c
- $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $<
+ $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/zutil.c
# Stub library binaries, these must be compiled for use in a shared library
# even though they will be placed in a static archive