Tcl_ExternalToUtf - buffer overflow on output on invalid encoding
Closed / Fixed33f9b4de51219958c4fe65502c2a1c4ba84a9ffaCreated 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-08-22 16:32:19
The following demonstrates overwrite of output buffer if high surrogate not followed by low surrogate at output buffer limit.
% set high [string range [encoding convertto utf-16le \U1f600] 0 1]
% set result [testencoding Tcl_ExternalToUtf utf-16le ${high}\xa8\x9e {start end noterminate tcl8} 0 5 nread nwrote]
Tcl_ExternalToUtf wrote past output buffer
Referenced by3
6711cc9484Merge [df6a7e1b38bfae63]: Fix [33f9b4de51], [945d2387d7], [f2e924e881] - encoding character limit bugs. check-in2024-08-31 07:38:40df6a7e1b38Fix [33f9b4de51], [945d2387d7], [f2e924e881] - encoding character limit bugs check-in2024-08-23 08:32:29c19b624fa9Proposed fixes for [945d2387d7], [f2e924e881], [33f9b4de51] check-in2024-08-22 18:12:15
apnadkarniplain2024-08-22 16:34:21
Looking at it together with [f2e924e881], [945d2387d7]
apnadkarniplain2024-08-23 08:34:51
Fixed in [df6a7e1b38].
Log in (anonymous is fine) to add a comment.