summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2007-04-23 17:56:07 (GMT)
committerKevin B Kenny <kennykb@acm.org>2007-04-23 17:56:07 (GMT)
commitaa9216011ec86d77c35b1217e31a14c6517a4433 (patch)
tree88aa93236097bfeaa73b2aa50573e2c88548d89e
parent401efde7b4d67a1ca4b84373795ec67ccd785306 (diff)
downloadtcl-aa9216011ec86d77c35b1217e31a14c6517a4433.zip
tcl-aa9216011ec86d77c35b1217e31a14c6517a4433.tar.gz
tcl-aa9216011ec86d77c35b1217e31a14c6517a4433.tar.bz2
* generic/tclTest.c (Testregexpobjcmd): Removed an invalid access
beyond the end of 'objv' in 'testregexp -about'.
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclTest.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0830cc4..7bbfaf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,9 @@
* generic/tclStrToD.c (AccumulateDecimalDigit): Fixed a mistake
where we'd run beyond the end of the 'pow10_wide' array if
a number begins with a string of more than 'maxpow10_wide' zeroes.
- Both these issues reported under [Bug 1705778] - detected with
+ * generic/tclTest.c (Testregexpobjcmd): Removed an invalid access
+ beyond the end of 'objv' in 'testregexp -about'.
+ All three of these issues reported under [Bug 1705778] - detected with
the existing test suite, no new regression tests required.
2007-04-22 Miguel Sofer <msofer@users.sf.net>
diff --git a/generic/tclTest.c b/generic/tclTest.c
index bbfff88..4ed28c8 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.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: tclTest.c,v 1.108 2007/04/20 06:10:59 kennykb Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.109 2007/04/23 17:56:07 kennykb Exp $
*/
#define TCL_TEST
@@ -3707,7 +3707,6 @@ TestregexpObjCmd(
if (regExpr == NULL) {
return TCL_ERROR;
}
- objPtr = objv[1];
if (about) {
if (TclRegAbout(interp, regExpr) < 0) {
@@ -3716,6 +3715,7 @@ TestregexpObjCmd(
return TCL_OK;
}
+ objPtr = objv[1];
match = Tcl_RegExpExecObj(interp, regExpr, objPtr, 0 /* offset */,
objc-2 /* nmatches */, eflags);