summaryrefslogtreecommitdiffstats
path: root/tests/imgPhoto.test
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2024-06-14 10:38:21 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2024-06-14 10:38:21 (GMT)
commite9fc9ea2605337871420f15bb402842cf075e530 (patch)
tree8c9c6394db3d6a5e6cd02d0c27170dea135e8e3d /tests/imgPhoto.test
parenta9bd9ec0b82c1e836535de55676e47d329a260f2 (diff)
downloadtk-e9fc9ea2605337871420f15bb402842cf075e530.zip
tk-e9fc9ea2605337871420f15bb402842cf075e530.tar.gz
tk-e9fc9ea2605337871420f15bb402842cf075e530.tar.bz2
Ticket [865af0148c] GIF errornously accepted if colormap segment is truncated
Diffstat (limited to 'tests/imgPhoto.test')
-rw-r--r--tests/imgPhoto.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 1d3b6e5..ae1f473 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -1349,6 +1349,23 @@ test imgPhoto-18.6 {Reject truncated GIF (file)} -setup {
} -cleanup {
catch {image delete gif1}
} -returnCodes error -result {error reading color map}
+test imgPhoto-18.6.1 {Reject truncated GIF in Colormap - ticket 865af0148c - file} -setup {
+ set fileName [file join [file dirname [info script]] corruptTruncatedColormap.gif]
+} -body {
+ image create photo gif1 -file $fileName
+} -cleanup {
+ catch {image delete gif1}
+} -returnCodes error -result {GIF file truncated}
+test imgPhoto-28.6.2 {Reject truncated GIF in Colormap - ticket 865af0148c - data} -setup {
+ set fileName [file join [file dirname [info script]] corruptTruncatedColormap.gif]
+ set h [open $fileName rb]
+ set d [read $h]
+ close $h
+} -body {
+ image create photo gif1 -data $d
+} -cleanup {
+ catch {image delete gif1}
+} -returnCodes error -result {GIF file truncated}
test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints {
nonPortable
} -setup {