diff options
author | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:19:30 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:19:30 (GMT) |
commit | ac5258caba03972be43bafc65a38ad4571af178f (patch) | |
tree | df090e2e9f46ea9581c05590f6d894020efac3b7 | |
parent | 9d7f713f586c81f1d0d0632785099ab9d6b852e1 (diff) | |
download | tcl-ac5258caba03972be43bafc65a38ad4571af178f.zip tcl-ac5258caba03972be43bafc65a38ad4571af178f.tar.gz tcl-ac5258caba03972be43bafc65a38ad4571af178f.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-15 Kevin Kenny <kennykb@acm.org> * generic/tclEvent.c (Tcl_Finalize): stuffed memory leak diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 1f7cd44..551a41b 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.18 2004/04/06 22:25:52 dgp Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.19 2004/07/15 20:19:30 andreas_kupries Exp $ */ #include "tclInt.h" @@ -101,7 +101,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); |