From 449441210921c8ed417b0c4d5edbccd2d57e23f8 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 2 Feb 2022 14:19:06 +1300 Subject: Add tests for GIF files with invalid LZW code sizes --- tests/test-images/fail/overflow-codes-max.gif | Bin 0 -> 65 bytes tests/test-images/fail/overflow-codes.gif | Bin 0 -> 35 bytes tests/test-images/gif-test-suite/TESTS | 2 ++ tests/test-images/gif-test-suite/invalid-code.conf | 11 +++++++++++ tests/test-images/gif-test-suite/invalid-code.gif | Bin 0 -> 35 bytes tests/test-images/gif-test-suite/overflow-codes-max.conf | 11 +++++++++++ tests/test-images/gif-test-suite/overflow-codes-max.gif | Bin 0 -> 65 bytes tests/test-images/gif-test-suite/overflow-codes.conf | 11 +++++++++++ tests/test-images/gif-test-suite/overflow-codes.gif | Bin 0 -> 35 bytes 9 files changed, 35 insertions(+) create mode 100644 tests/test-images/fail/overflow-codes-max.gif create mode 100644 tests/test-images/fail/overflow-codes.gif create mode 100644 tests/test-images/gif-test-suite/invalid-code.conf create mode 100644 tests/test-images/gif-test-suite/invalid-code.gif create mode 100644 tests/test-images/gif-test-suite/overflow-codes-max.conf create mode 100644 tests/test-images/gif-test-suite/overflow-codes-max.gif create mode 100644 tests/test-images/gif-test-suite/overflow-codes.conf create mode 100644 tests/test-images/gif-test-suite/overflow-codes.gif diff --git a/tests/test-images/fail/overflow-codes-max.gif b/tests/test-images/fail/overflow-codes-max.gif new file mode 100644 index 000000000..3d507ca7d Binary files /dev/null and b/tests/test-images/fail/overflow-codes-max.gif differ diff --git a/tests/test-images/fail/overflow-codes.gif b/tests/test-images/fail/overflow-codes.gif new file mode 100644 index 000000000..c38053872 Binary files /dev/null and b/tests/test-images/fail/overflow-codes.gif differ diff --git a/tests/test-images/gif-test-suite/TESTS b/tests/test-images/gif-test-suite/TESTS index 1d4a3f13f..bc573acf4 100644 --- a/tests/test-images/gif-test-suite/TESTS +++ b/tests/test-images/gif-test-suite/TESTS @@ -44,6 +44,8 @@ max-height 255-codes large-codes max-codes +#overflow-codes +#overflow-codes-max transparent invalid-transparent disabled-transparent diff --git a/tests/test-images/gif-test-suite/invalid-code.conf b/tests/test-images/gif-test-suite/invalid-code.conf new file mode 100644 index 000000000..3bf287b4e --- /dev/null +++ b/tests/test-images/gif-test-suite/invalid-code.conf @@ -0,0 +1,11 @@ +# Automatically generated, do not edit! +[config] +input = invalid-code.gif +version = GIF89a +width = 2 +height = 2 +background = #000000 +loop-count = 0 +force-animation = no +frames = + diff --git a/tests/test-images/gif-test-suite/invalid-code.gif b/tests/test-images/gif-test-suite/invalid-code.gif new file mode 100644 index 000000000..7d929c943 Binary files /dev/null and b/tests/test-images/gif-test-suite/invalid-code.gif differ diff --git a/tests/test-images/gif-test-suite/overflow-codes-max.conf b/tests/test-images/gif-test-suite/overflow-codes-max.conf new file mode 100644 index 000000000..f6d3f38d8 --- /dev/null +++ b/tests/test-images/gif-test-suite/overflow-codes-max.conf @@ -0,0 +1,11 @@ +# Automatically generated, do not edit! +[config] +input = overflow-codes-max.gif +version = GIF89a +width = 2 +height = 2 +background = #000000 +loop-count = 0 +force-animation = no +frames = + diff --git a/tests/test-images/gif-test-suite/overflow-codes-max.gif b/tests/test-images/gif-test-suite/overflow-codes-max.gif new file mode 100644 index 000000000..3d507ca7d Binary files /dev/null and b/tests/test-images/gif-test-suite/overflow-codes-max.gif differ diff --git a/tests/test-images/gif-test-suite/overflow-codes.conf b/tests/test-images/gif-test-suite/overflow-codes.conf new file mode 100644 index 000000000..19f57fa74 --- /dev/null +++ b/tests/test-images/gif-test-suite/overflow-codes.conf @@ -0,0 +1,11 @@ +# Automatically generated, do not edit! +[config] +input = overflow-codes.gif +version = GIF89a +width = 2 +height = 2 +background = #000000 +loop-count = 0 +force-animation = no +frames = + diff --git a/tests/test-images/gif-test-suite/overflow-codes.gif b/tests/test-images/gif-test-suite/overflow-codes.gif new file mode 100644 index 000000000..c38053872 Binary files /dev/null and b/tests/test-images/gif-test-suite/overflow-codes.gif differ -- cgit v1.2.1