Overview
| Artifact ID: | 15d56f773ccab23c76b381e900e6df3e4114eb669f01f71fa0198e0626c82bc3 |
|---|---|
| Ticket: | 74cc95b563dd5450eac9e0ea9c8ad1e4273c9d41
UpdateStringOfDict(): signed integer overflow |
| User & Date: | chrstphrchvz on 2022-10-04 06:31:42 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
…which these example scripts trigger and the attached patch prevents: <ul> <li><pre> # s has string representation with length INT_MAX-1 set s [string repeat [string repeat {a} 14949] 143654] set d1 [dict create aa $s] puts [string is upper $d1] </pre> <pre> <span style="font-weight:bold">tcl/generic/tclDictObj.c:539:14: <span style="color:firebrick">runtime error:</span> signed integer overflow: 2 + 2147483646 cannot be represented in type 'int'</span> max size for a Tcl value (2147483647 bytes) exceeded </pre> (tclsh aborts) </li> <li><pre> # s has string representation with length INT_MAX-1 set s [string repeat [string repeat {a} 14949] 143654] set d2 [dict create a $s z {}] puts [string is upper $d2] </pre> <pre> <span style="font-weight:bold">tcl/generic/tclDictObj.c:531:14: <span style="color:firebrick">runtime error:</span> signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'</span> max size for a Tcl value (2147483647 bytes) exceeded </pre> (tclsh aborts) </li> </ul> - foundin changed to: "core-8-6-branch"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "15. Dict Object"
- title changed to: "UpdateStringOfDict(): signed integer overflow"
- type changed to: "Patch"