Overview
| Artifact ID: | 9aec2b5f75b62d2a9eb0f456259e246b19306e9f |
|---|---|
| Ticket: | 2738427fffffffffffffffffffffffffffffffff
Tcl_NumUtfChars(...) no overflow check |
| User & Date: | jan.nijtmans on 2017-06-08 12:26:18 |
Changes
- closer changed to: "nobody"
- comment changed to:
Tcl_NumUtfChars(unicode, -1) can return negative counts if there are really more than INT_MAX Utf chars located at unicode before a terminating \0 is seen. In addition, there is another overflow problem, e.g. Tcl_NumUtfChars("\xE2\x82\xAC", 2): This call returns 1 instead of the expected 2. - icomment:
Problem with the Tcl_NumUtfChars("\xE2\x82\xAC", 2) call is that the 3th byte is read, even though a length of only 2 bytes was requested. Since with only 2 bytes, the unicode character is incomplete, Tcl_NumUtfChars() should count this as 2 separate bytes. - login: "jan.nijtmans"
- mimetype: "text/plain"
- severity changed to: "Minor"
- title changed to: "Tcl_NumUtfChars(...) no overflow check"