summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-05-05 17:12:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-05-05 17:12:52 (GMT)
commitab808831bd7d76198dfc874049b9fd00b009646e (patch)
treea88cfd4f910da63336af1d7604d7ca26502b3099 /tests
parentd489f8278641d1b55d50c3800e86e567d7951153 (diff)
downloadtcl-ab808831bd7d76198dfc874049b9fd00b009646e.zip
tcl-ab808831bd7d76198dfc874049b9fd00b009646e.tar.gz
tcl-ab808831bd7d76198dfc874049b9fd00b009646e.tar.bz2
[6015221f59] Segfault after overflow of [binary] field specifier numeric count.
Diffstat (limited to 'tests')
-rw-r--r--tests/binary.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test
index e43b9f4..20aa7d3 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -1420,6 +1420,18 @@ test binary-37.9 {GetFormatSpec: numbers} {
binary scan $x f* bla
set bla
} {1.0 -1.0 2.0 -2.0 0.0}
+test binary-37.10 {GetFormatSpec: count overflow} {
+ binary scan x a[format %ld 0x7fffffff] r
+} 0
+test binary-37.11 {GetFormatSpec: count overflow} {
+ binary scan x a[format %ld 0x10000000] r
+} 0
+test binary-37.12 {GetFormatSpec: count overflow} {
+ binary scan x a[format %ld 0x100000000] r
+} 0
+test binary-37.13 {GetFormatSpec: count overflow} {
+ binary scan x a[format %lld 0x10000000000000000] r
+} 0
test binary-38.1 {FormatNumber: word alignment} {
set x [binary format c1s1 1 1]