diff options
author | msofer <msofer@noemail.net> | 2006-09-24 21:15:09 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2006-09-24 21:15:09 (GMT) |
commit | 2a69ce16e7c34d2669f174be9349868a34ba362b (patch) | |
tree | 52642af6e3fb2c29a09534224d480bb89536d396 /generic/tclParse.c | |
parent | b2b9c5dbebc0ec6f42e43ec17bf8a2cc3cd9e609 (diff) | |
download | tcl-2a69ce16e7c34d2669f174be9349868a34ba362b.zip tcl-2a69ce16e7c34d2669f174be9349868a34ba362b.tar.gz tcl-2a69ce16e7c34d2669f174be9349868a34ba362b.tar.bz2 |
* generic/tclParse.c (Tcl_ParseCommand): also return an error if
start==NULL and numBytes<0. This is coverity's bug #20
* generic/tclStringObj.c (STRING_SIZE): fix allocation for
0-length strings. This is coverity's bugs #54-5
FossilOrigin-Name: cbbabd2395ec80a8faa1b00c284951f29da82e61
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index ec8c9f0..fc7a77c 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -13,7 +13,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.25 2003/02/16 01:36:32 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.25.2.1 2006/09/24 21:15:10 msofer Exp $ */ #include "tclInt.h" @@ -238,7 +238,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr) * point to char after terminating one. */ int scanned; - if ((string == NULL) && (numBytes>0)) { + if ((string == NULL) && (numBytes!=0)) { if (interp != NULL) { Tcl_SetResult(interp, "can't parse a NULL pointer", TCL_STATIC); } |