diff options
author | dgp <dgp@users.sourceforge.net> | 2012-01-19 20:46:04 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-01-19 20:46:04 (GMT) |
commit | 868168e18953894ec72ea898ff4d2f518283184e (patch) | |
tree | 403c372c2579d691321cae91bd0a08637333017c /generic/tclCmdMZ.c | |
parent | bbed95eccee9f7f5940bf4465a16ec6e6efbb84a (diff) | |
download | tcl-868168e18953894ec72ea898ff4d2f518283184e.zip tcl-868168e18953894ec72ea898ff4d2f518283184e.tar.gz tcl-868168e18953894ec72ea898ff4d2f518283184e.tar.bz2 |
3475667 Prevent buffer read overflow. Thanks to "sebres" for the report and fix.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index ccf3bc6..27e4055 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -378,7 +378,7 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) while (1) { match = Tcl_RegExpExecObj(interp, regExpr, objPtr, offset /* offset */, numMatchesSaved, eflags - | ((offset > 0 && + | ((offset > 0 && offset < stringLength && (Tcl_GetUniChar(objPtr,offset-1) != (Tcl_UniChar)'\n')) ? TCL_REG_NOTBOL : 0)); |