|
2022-10-06
| ||
| 10:24 | • Closed ticket [74cc95b563]: UpdateStringOfDict(): signed integer overflow pl... artifact: 3465c7eff9 user: jan.nijtmans | |
| 09:06 | Fix [e32a44e2e4], [1599352cca], [5ec43cfd9b] and [74cc95b563] check-in: 0e2b23ff84 user: jan.nijtmans tags: core-8-6-branch | |
|
2022-10-04
| ||
| 06:35 | • Add attachment 74cc95b563dd.diff to ticket [74cc95b563dd5450|74cc95b563... artifact: 6f9dbdf42e user: chrstphrchvz | |
| 06:31 | • New ticket [74cc95b563] UpdateStringOfDict(): signed integer overflow. artifact: 15d56f773c user: chrstphrchvz | |
UpdateStringOfDict(): signed integer overflow
Closed / Fixed74cc95b563dd5450eac9e0ea9c8ad1e4273c9d41Created 4 years agoUpdated 4 years ago
Descriptionwiki2022-10-04 06:31:42
…which these example scripts trigger and the attached patch prevents:
# 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]tcl/generic/tclDictObj.c:539:14: runtime error: signed integer overflow: 2 + 2147483646 cannot be represented in type 'int' max size for a Tcl value (2147483647 bytes) exceeded(tclsh aborts)# 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]tcl/generic/tclDictObj.c:531:14: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' max size for a Tcl value (2147483647 bytes) exceeded(tclsh aborts)
Referenced by1
0e2b23ff84Fix [e32a44e2e4], [1599352cca], [5ec43cfd9b] and [74cc95b563] check-in2022-10-06 09:06:07
jan.nijtmanswiki2022-10-06 10:24:16
Should be fixed [here]
Log in (anonymous is fine) to add a comment.
Attachments:
- 74cc95b563dd.diff [download] added by chrstphrchvz on 2022-10-04 06:35:33. [details]