summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-09-24 21:15:09 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-09-24 21:15:09 (GMT)
commitdfdd2bf4859375909d0094b1c89280448e7544b5 (patch)
tree52642af6e3fb2c29a09534224d480bb89536d396 /generic/tclParse.c
parent68d397d14ec547c033d0f9b5df612e06f638fef1 (diff)
downloadtcl-dfdd2bf4859375909d0094b1c89280448e7544b5.zip
tcl-dfdd2bf4859375909d0094b1c89280448e7544b5.tar.gz
tcl-dfdd2bf4859375909d0094b1c89280448e7544b5.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
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c4
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);
}