Overview
| Artifact ID: | f7026638d7ee7003dec362e9f42738494446786c |
|---|---|
| Ticket: | 714106ffffffffffffffffffffffffffffffffff
[string repeat] may crash |
| User & Date: | nobody on 2003-04-02 18:58:39 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.4.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "41. Memory Allocation"
- title changed to: "[string repeat] may crash"
- type changed to: "Bug"