summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclParse.c4
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 <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);
}