From 0b9d00413d9f31231af348e7761b98bb5501980d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 12 Dec 2018 13:00:58 +1300 Subject: gif: Add "Circular table entry" failing GIF image test case An example image that generates the "Circular table entry in GIF file" error. --- tests/circular-table.gif | Bin 0 -> 403644 bytes tests/meson.build | 1 + tests/pixbuf-gif-circular-table.c | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 tests/circular-table.gif create mode 100644 tests/pixbuf-gif-circular-table.c (limited to 'tests') diff --git a/tests/circular-table.gif b/tests/circular-table.gif new file mode 100644 index 000000000..b893e7d6c Binary files /dev/null and b/tests/circular-table.gif differ diff --git a/tests/meson.build b/tests/meson.build index b7f9bc45c..aaa1817e7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -64,6 +64,7 @@ installed_tests = [ [ 'pixbuf-scale', ['ops'], ], [ 'pixbuf-scale-two-step', ['ops'], ], [ 'pixbuf-short-gif-write', ['format'], ], + [ 'pixbuf-gif-circular-table', ['format'], ], [ 'pixbuf-save', ['io'] ], [ 'pixbuf-readonly-to-mutable', ['conform'], ], [ 'pixbuf-composite', ['ops'], ], diff --git a/tests/pixbuf-gif-circular-table.c b/tests/pixbuf-gif-circular-table.c new file mode 100644 index 000000000..a1ce15f9f --- /dev/null +++ b/tests/pixbuf-gif-circular-table.c @@ -0,0 +1,24 @@ +#include "config.h" +#include "gdk-pixbuf/gdk-pixbuf.h" +#include + +static void +test_gif_circular_table (void) +{ + GdkPixbuf *pixbuf; + GError *error = NULL; + + pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "circular-table.gif", NULL), &error); + g_assert_no_error (error); + + g_object_unref (pixbuf); +} + +int main (int argc, char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/pixbuf/gif/circular-table", test_gif_circular_table); + + return g_test_run (); +} -- cgit v1.2.1