Tcl Source Code

Check-in [91d91053a6]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:close fork
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA1: 91d91053a633a99ece472fa830f0af9a161c190c
User & Date: dgp 2016-11-04 14:39:00
Context
2016-11-04
14:40
[824752f10e] More robust, portable check for integer overflow. check-in: b2a4266498 user: dgp tags: core-8-6-branch
14:39
close fork check-in: 91d91053a6 user: dgp tags: core-8-6-branch
14:23
merge core-8-5-branch ([824752f10e] Avoid calling Tcl_SetObjResult if interp is NULL) check-in: e7a9d70cd2 user: gahr tags: core-8-6-branch
11:50
Fix the generated copyright sections in the HTML help file. check-in: 973f7c7d0b user: jan.nijtmans tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclListObj.c.

903
904
905
906
907
908
909

910
911


912
913
914
915
916
917
918
	 * overflow in determining 'first+count'.
	 */

	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));


	return TCL_ERROR;
    }
    isShared = (listRepPtr->refCount > 1);
    numRequired = numElems - count + objc; /* Known <= LIST_MAX */
    needGrow = numRequired > listRepPtr->maxElemCount;

    for (i = 0;  i < objc;  i++) {






>
|
|
>
>







903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
	 * overflow in determining 'first+count'.
	 */

	count = numElems - first;
    }

    if (objc > LIST_MAX - (numElems - count)) {
	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 */
    needGrow = numRequired > listRepPtr->maxElemCount;

    for (i = 0;  i < objc;  i++) {