diff options
author | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:17:48 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:17:48 (GMT) |
commit | 3c87843ad32da0db04bc580121a56049ad5cb367 (patch) | |
tree | 4ed42c7124c7440ebb23f449d17233eba9333422 | |
parent | 816931b3a11518954c98b53eecf1a4c0824545b8 (diff) | |
download | tcl-3c87843ad32da0db04bc580121a56049ad5cb367.zip tcl-3c87843ad32da0db04bc580121a56049ad5cb367.tar.gz tcl-3c87843ad32da0db04bc580121a56049ad5cb367.tar.bz2 |
* generic/tclIOCmd.c (Tcl_PutsObjCmd): Added length check to the
old depreceated newline syntax, to ensure that only "nonewline"
is accepted. [Tcl SF Bug 985869], reported by Joe Mistachkin
<mistachkin@users.sourceforge.net>.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2004-07-15 Andreas Kupries <andreask@pliers.activestate.com> + + * generic/tclIOCmd.c (Tcl_PutsObjCmd): Added length check to the + old depreceated newline syntax, to ensure that only "nonewline" + is accepted. [Tcl SF Bug 985869], reported by Joe Mistachkin + <mistachkin@users.sourceforge.net>. + 2004-07-13 Jeff Hobbs <jeffh@ActiveState.com> * README, generic/tcl.h, tools/tcl.wse.in: bumped to diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index bb2b567..affa53b 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.15 2002/02/15 14:28:49 dkf Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.15.2.1 2004/07/15 20:17:48 andreas_kupries Exp $ */ #include "tclInt.h" @@ -102,7 +102,7 @@ Tcl_PutsObjCmd(dummy, interp, objc, objv) int length; arg = Tcl_GetStringFromObj(objv[3], &length); - if (strncmp(arg, "nonewline", (size_t) length) != 0) { + if ((length != 9) || (strncmp(arg, "nonewline", (size_t) length) != 0)) { Tcl_AppendResult(interp, "bad argument \"", arg, "\": should be \"nonewline\"", (char *) NULL); |