summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2006-09-24 19:13:41 (GMT)
committermsofer <msofer@noemail.net>2006-09-24 19:13:41 (GMT)
commite0b3e767771b5f53196d64e3a3a1be5614f5c225 (patch)
tree889f4ce32fdff9205065ae765fa59466f7eb2a7a
parente1adcee2a9fa44342e2d1ee827f849924356d8a7 (diff)
downloadtcl-e0b3e767771b5f53196d64e3a3a1be5614f5c225.zip
tcl-e0b3e767771b5f53196d64e3a3a1be5614f5c225.tar.gz
tcl-e0b3e767771b5f53196d64e3a3a1be5614f5c225.tar.bz2
* generic/tclParse.c (Tcl_ParseCommand): also return an error if
start==NULL and numBytes<0. This is coverity's bug #20 FossilOrigin-Name: 11e24ed21cba75cbefa933d002955c55f09b2d0f
-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);
}