diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2024-06-14 10:38:21 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2024-06-14 10:38:21 (GMT) |
commit | e9fc9ea2605337871420f15bb402842cf075e530 (patch) | |
tree | 8c9c6394db3d6a5e6cd02d0c27170dea135e8e3d /tests | |
parent | a9bd9ec0b82c1e836535de55676e47d329a260f2 (diff) | |
download | tk-e9fc9ea2605337871420f15bb402842cf075e530.zip tk-e9fc9ea2605337871420f15bb402842cf075e530.tar.gz tk-e9fc9ea2605337871420f15bb402842cf075e530.tar.bz2 |
Ticket [865af0148c] GIF errornously accepted if colormap segment is truncated
Diffstat (limited to 'tests')
-rw-r--r-- | tests/corruptTruncatedColormap.gif | bin | 0 -> 10 bytes | |||
-rw-r--r-- | tests/imgPhoto.test | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/corruptTruncatedColormap.gif b/tests/corruptTruncatedColormap.gif Binary files differnew file mode 100644 index 0000000..21d4add --- /dev/null +++ b/tests/corruptTruncatedColormap.gif 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 { |