summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-09-24 19:13:42 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-09-24 19:13:42 (GMT)
commit8d6152095bc898e1db290fe1865eb783c070e3e3 (patch)
tree889f4ce32fdff9205065ae765fa59466f7eb2a7a /generic/tclParse.c
parent62bcd073cca2f53f94bf0e4c74ca30200e5d34e4 (diff)
downloadtcl-8d6152095bc898e1db290fe1865eb783c070e3e3.zip
tcl-8d6152095bc898e1db290fe1865eb783c070e3e3.tar.gz
tcl-8d6152095bc898e1db290fe1865eb783c070e3e3.tar.bz2
* generic/tclParse.c (Tcl_ParseCommand): also return an error if
start==NULL and numBytes<0. This is coverity's bug #20
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 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);
}