diff options
author | Pietro Cerutti <gahr@FreeBSD.org> | 2016-11-04 15:15:36 +0000 |
---|---|---|
committer | Pietro Cerutti <gahr@FreeBSD.org> | 2016-11-04 15:15:36 +0000 |
commit | 315efbe78fdfdfb9b9cfdd27b37326f2eb0e6126 (patch) | |
tree | ccd790f424b8348ab09852d61b4910e7992e197f | |
parent | 4d9192e0f7d822b255d4625f78cbc535f32ed9b1 (diff) |
Notes
-rw-r--r-- | lang/tcl85/Makefile | 1 | ||||
-rw-r--r-- | lang/tcl85/files/patch-bug214205 | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/lang/tcl85/Makefile b/lang/tcl85/Makefile index 2d44a1c40390..beaf1f2d8100 100644 --- a/lang/tcl85/Makefile +++ b/lang/tcl85/Makefile @@ -3,6 +3,7 @@ PORTNAME= tcl PORTVERSION= 8.5.19 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= TCLTK/tcl8_5 \ SF/tcl/Tcl/${PORTVERSION} diff --git a/lang/tcl85/files/patch-bug214205 b/lang/tcl85/files/patch-bug214205 new file mode 100644 index 000000000000..8f07de9e947c --- /dev/null +++ b/lang/tcl85/files/patch-bug214205 @@ -0,0 +1,46 @@ +Index: ../generic/tclListObj.c +================================================================== +--- ../generic/tclListObj.c ++++ ../generic/tclListObj.c +@@ -853,12 +853,15 @@ + */ + count = numElems - first; + } + + if (objc > LIST_MAX - (numElems - count)) { +- Tcl_SetObjResult(interp, Tcl_ObjPrintf( +- "max length of a Tcl list (%d elements) exceeded", LIST_MAX)); ++ if (interp != NULL) { ++ Tcl_SetObjResult(interp, Tcl_ObjPrintf( ++ "max length of a Tcl list (%d elements) exceeded", ++ LIST_MAX)); ++ } + return TCL_ERROR; + } + isShared = (listRepPtr->refCount > 1); + numRequired = numElems - count + objc; /* Known <= LIST_MAX */ + + +Index: ../generic/tclListObj.c +================================================================== +--- ../generic/tclListObj.c ++++ ../generic/tclListObj.c +@@ -844,15 +844,12 @@ + if (first >= numElems) { + first = numElems; /* So we'll insert after last element. */ + } + if (count < 0) { + count = 0; +- } else if (numElems < first+count || first+count < 0) { +- /* +- * The 'first+count < 0' condition here guards agains integer +- * overflow in determining 'first+count' +- */ ++ } else if (first > INT_MAX - count /* Handle integer overflow */ ++ || numElems < first+count) { + count = numElems - first; + } + + if (objc > LIST_MAX - (numElems - count)) { + if (interp != NULL) { + |