From ae3997b382bb6074b751bdec7da4c47bfd78e648 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 21 Nov 2017 20:35:20 +0000 Subject: Add test imgPNG-3.1 demonstrating bug [1c659ef0f1] --- tests/iDOT.png | Bin 0 -> 6279 bytes tests/imgPNG.test | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/iDOT.png diff --git a/tests/iDOT.png b/tests/iDOT.png new file mode 100644 index 0000000..e8cd024 Binary files /dev/null and b/tests/iDOT.png differ diff --git a/tests/imgPNG.test b/tests/imgPNG.test index 0757411..335ac39 100644 --- a/tests/imgPNG.test +++ b/tests/imgPNG.test @@ -1103,6 +1103,17 @@ test imgPNG-2.2 {reading a good image with multiple IDATs} -setup { } -cleanup { image delete $i } -result 223x212 + +test imgPNG-3.1 {reading image with unknown ancillary chunk - bug [1c659ef0f1]} -setup { + set fileName [file join [file dirname [info script]] iDOT.png] +} -body { + # the image contains an unknown chunk iDOT + # since the name of this chunk starts with a lowercase letter, + # it's an ancillary chunk that shall not trigger an error + catch {image create photo -file $fileName} +} -cleanup { + catch {image delete $im} +} -result {0} } namespace delete png -- cgit v0.12