From e0b3e767771b5f53196d64e3a3a1be5614f5c225 Mon Sep 17 00:00:00 2001 From: msofer Date: Sun, 24 Sep 2006 19:13:41 +0000 Subject: * generic/tclParse.c (Tcl_ParseCommand): also return an error if start==NULL and numBytes<0. This is coverity's bug #20 FossilOrigin-Name: 11e24ed21cba75cbefa933d002955c55f09b2d0f --- ChangeLog | 5 +++++ generic/tclParse.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5fe89e..a4c5a58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-24 Miguel Sofer + + * 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 * 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); } -- cgit v0.12