diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-07-15 12:36:28 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2016-07-15 14:28:43 +0200 |
commit | 4d8f54bd0bcede37138db29e371611f334092fc2 (patch) | |
tree | 816bde1784be4605e41f40c3f3f511beeb779250 /tests/tga | |
parent | ff0234f4da6d1116c0baa66eebd8497526f7a5d9 (diff) | |
download | libgd-4d8f54bd0bcede37138db29e371611f334092fc2.tar.gz |
Add a further regression test for issue #248fix-248
Diffstat (limited to 'tests/tga')
-rw-r--r-- | tests/tga/.gitignore | 1 | ||||
-rw-r--r-- | tests/tga/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/tga/Makemodule.am | 4 | ||||
-rw-r--r-- | tests/tga/bug00248a.c | 16 | ||||
-rw-r--r-- | tests/tga/bug00248a.tga | bin | 0 -> 816 bytes |
5 files changed, 21 insertions, 1 deletions
diff --git a/tests/tga/.gitignore b/tests/tga/.gitignore index 826de62..e88e124 100644 --- a/tests/tga/.gitignore +++ b/tests/tga/.gitignore @@ -2,4 +2,5 @@ /bug00247 /bug00247a /bug00248 +/bug00248a /tga_null diff --git a/tests/tga/CMakeLists.txt b/tests/tga/CMakeLists.txt index 585f0b8..c3a589c 100644 --- a/tests/tga/CMakeLists.txt +++ b/tests/tga/CMakeLists.txt @@ -4,6 +4,7 @@ LIST(APPEND TESTS_FILES bug00247 bug00247a bug00248 + bug00248a ) ADD_GD_TESTS() diff --git a/tests/tga/Makemodule.am b/tests/tga/Makemodule.am index e351a70..dff828f 100644 --- a/tests/tga/Makemodule.am +++ b/tests/tga/Makemodule.am @@ -3,6 +3,7 @@ libgd_test_programs += \ tga/bug00247 \ tga/bug00247a \ tga/bug00248 \ + tga/bug00248a \ tga/tga_null EXTRA_DIST += \ @@ -10,4 +11,5 @@ EXTRA_DIST += \ tga/bug00084.tga \ tga/bug00247.tga \ tga/bug00247a.tga \ - tga/bug00248.tga + tga/bug00248.tga \ + tga/bug00248a.tga diff --git a/tests/tga/bug00248a.c b/tests/tga/bug00248a.c new file mode 100644 index 0000000..8308eb5 --- /dev/null +++ b/tests/tga/bug00248a.c @@ -0,0 +1,16 @@ +/* See also <https://github.com/libgd/libgd/pull/257> */ + +#include <stdio.h> + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + FILE *fp = gdTestFileOpen("tga/bug00248a.tga"); + im = gdImageCreateFromTga(fp); + gdTestAssert(im == NULL); + fclose(fp); + return gdNumFailures(); +} diff --git a/tests/tga/bug00248a.tga b/tests/tga/bug00248a.tga Binary files differnew file mode 100644 index 0000000..29c4e26 --- /dev/null +++ b/tests/tga/bug00248a.tga |