Tcl_UtfToExternal buffer overwrite for non-BMP characters using utf-16 encoders
Closed / Fixed66da4d4228be65fea83fa7eb4f9e932b7951341dCreated 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-10-19 15:51:30
UTF-16 encoders write beyond destination space when encoding non-BMP characters.
% set utf8 [binary decode hex 41f09f988042]; encoding convertfrom utf-8 $utf8
A😀B
% testencoding Tcl_UtfToExternal utf-16le $utf8 {start end} {} 7 nread nwritten nchars
Tcl_UtfToExternal wrote past output buffer
Referenced by4
79192a279dMerge [42925131911a8796]: Fix [66da4d4228] - UTF-16 encoder buffer overflow. More encoding tests. check-in2024-10-26 22:10:22c0e4798bb1(cherry-pick): Fix [66da4d4228] - UTF-16 encoder buffer overflow check-in2024-10-22 13:08:164292513191Fix [66da4d4228] - UTF-16 encoder buffer overflow. More encoding tests check-in2024-10-21 02:39:204574a1e8d3Fix [66da4d4228] - UTF-16 encoder buffer overflow check-in2024-10-19 16:19:13
apnadkarniplain2024-10-19 16:21:29
Proposed fix in [4574a1e8d3]
apnadkarni Closed ticket [66da4d4228].
[History diff]2024-10-22 16:59:40
Log in (anonymous is fine) to add a comment.