diff options
| author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-09-24 19:13:42 (GMT) |
|---|---|---|
| committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-09-24 19:13:42 (GMT) |
| commit | df67c7c634d472f46908d576dda480835a3939ae (patch) | |
| tree | 889f4ce32fdff9205065ae765fa59466f7eb2a7a | |
| parent | 4f2737fcc88d0814f67767aed9b985373229af25 (diff) | |
| download | tcl-df67c7c634d472f46908d576dda480835a3939ae.zip tcl-df67c7c634d472f46908d576dda480835a3939ae.tar.gz tcl-df67c7c634d472f46908d576dda480835a3939ae.tar.bz2 | |
* generic/tclParse.c (Tcl_ParseCommand): also return an error if
start==NULL and numBytes<0. This is coverity's bug #20
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | generic/tclParse.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-09-24 Miguel Sofer <msofer@users.sf.net> + + * generic/tclParse.c (Tcl_ParseCommand): also return an error if + start==NULL and numBytes<0. This is coverity's bug #20 + 2006-09-22 Andreas Kupries <andreask@activestate.com> * generic/tclInt.h: Moved TIP#268's field 'packagePrefer' to the diff --git a/generic/tclParse.c b/generic/tclParse.c index 9800537..3574cd3 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.46 2006/07/05 05:34:45 dgp Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.47 2006/09/24 19:13:43 msofer Exp $ */ #include "tclInt.h" @@ -269,7 +269,7 @@ Tcl_ParseCommand( * point to char after terminating one. */ int scanned; - if ((start == NULL) && (numBytes>0)) { + if ((start == NULL) && (numBytes != 0)) { if (interp != NULL) { Tcl_SetResult(interp, "can't parse a NULL pointer", TCL_STATIC); } |
