Artifacts Associated With Ticket 714106ffffffffffffffffffffffffffffffffff
Ticket change [f7026638d7] (rid 130413) by nobody on 2003-04-02 18:58:39:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The following code crashes a 32-bit machine (PC): set M [string repeat x 1048576] set G4 [string repeat $M 4096] The culprit is the unchecked length multiplication in line 2110 in "generic/tclCmdMZ.c: length2 = length1 * count; That can overflow. As a result, much less memory gets allocated, than filled after allocation. I suggest to check the multiplication by back-division: if ((length2 / count) != length1) { ...error... } Heiner [email protected] - foundin initialized to: "obsolete: 8.4.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "41. Memory Allocation"
- title initialized to: "[string repeat] may crash"
- type initialized to: "Bug"
Add attachment "714106.strrepeat" [462e373f6f] (rid 99480) by hobbs on 2003-05-11 06:57:38.
Ticket change [3687e7bfe3] (rid 107117) by hobbs on 2003-05-11 06:57:38:
- closedate changed to: "2003-05-10T23:57:38"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Closed with the attached patch. I didn't add a test because it would have different behavior on 64-bit ILP systems. Fixed for 8.4.3 and 8.5.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"
Ticket change [1597a9cd8b] (rid 124594) by hobbs on 2003-05-11 06:57:39:
- icomment:
File Added - 50083: 714106.strrepeat
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment: