summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-08-18 06:57:08 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-08-18 06:57:08 (GMT)
commit8f0801033282ae8543f09d6e82509d8e1ef9122e (patch)
treeedec31ba4ab5b9b1ad2fb53bbca7139c31ad917f /tests
parentaeaba6971a969d6e628e5fd35f4cfca4fb2c683b (diff)
downloadtcl-8f0801033282ae8543f09d6e82509d8e1ef9122e.zip
tcl-8f0801033282ae8543f09d6e82509d8e1ef9122e.tar.gz
tcl-8f0801033282ae8543f09d6e82509d8e1ef9122e.tar.bz2
Fix UtfToUtf16Proc and UtfToUCS2Proc to not assume sizeof(Tcl_UniChar) is size of UTF16 / UCS2 code unit"
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 0d56a0b..72cc964 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -1075,12 +1075,8 @@ test encoding-bug-183a1adcc0-4 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExtern
} -result [list 0 [list nospace {} \x00\x00\xFF]]
test encoding-bug-183a1adcc0-5 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints {
- testencoding ucs2 knownBug
+ testencoding
} -body {
- # The knownBug constraint is because test depends on TCL_UTF_MAX and
- # also UtfToUtf16 assumes space required in destination buffer is
- # sizeof(Tcl_UniChar) which is incorrect when TCL_UTF_MAX==4
- # Note - buffers are initialized to \xFF
list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 4} result] $result
} -result [list 0 [list ok {} [expr {$::tcl_platform(byteOrder) eq "littleEndian" ? "\x41\x00" : "\x00\x41"}]\x00\x00]]