Tcl Source Code

Check-in [1fbee8ac5c]
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:Prevent reads of uninitalized memory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: 1fbee8ac5c6dedd77e8e67f2a68597595f7ecf6c5e8cec1a7c9bf73a8f769bd5
User & Date: dgp 2019-04-22 14:56:31
Context
2019-04-22
15:15
Stop leaking ZipFile in MountBuffer() check-in: 0ef31fdf73 user: dgp tags: core-8-branch
14:56
Prevent reads of uninitalized memory. check-in: 1fbee8ac5c user: dgp tags: core-8-branch
14:09
[zipfs mount_data] should not accept three arguments. check-in: b19fb1c8d2 user: dgp tags: core-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclZipfs.c.

1764
1765
1766
1767
1768
1769
1770

1771
1772
1773
1774
1775
1776
1777
	}
	memcpy(zf->data, data, datalen);
	zf->ptrToFree = zf->data;
    } else {
	zf->data = data;
	zf->ptrToFree = NULL;
    }

    if (ZipFSFindTOC(interp, 0, zf) != TCL_OK) {
	return TCL_ERROR;
    }
    return ZipFSCatalogFilesystem(interp, zf, mountPoint, NULL,
	    "Memory Buffer");
}
 






>







1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
	}
	memcpy(zf->data, data, datalen);
	zf->ptrToFree = zf->data;
    } else {
	zf->data = data;
	zf->ptrToFree = NULL;
    }
    zf->passBuf[0] = 0;	/* stop valgrind cries */
    if (ZipFSFindTOC(interp, 0, zf) != TCL_OK) {
	return TCL_ERROR;
    }
    return ZipFSCatalogFilesystem(interp, zf, mountPoint, NULL,
	    "Memory Buffer");
}