summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-07-15 12:36:28 +0200
committerOndřej Surý <ondrej@sury.org>2016-07-15 14:28:43 +0200
commit4d8f54bd0bcede37138db29e371611f334092fc2 (patch)
tree816bde1784be4605e41f40c3f3f511beeb779250
parentff0234f4da6d1116c0baa66eebd8497526f7a5d9 (diff)
downloadlibgd-fix-248.tar.gz
Add a further regression test for issue #248fix-248
-rw-r--r--tests/tga/.gitignore1
-rw-r--r--tests/tga/CMakeLists.txt1
-rw-r--r--tests/tga/Makemodule.am4
-rw-r--r--tests/tga/bug00248a.c16
-rw-r--r--tests/tga/bug00248a.tgabin0 -> 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
new file mode 100644
index 0000000..29c4e26
--- /dev/null
+++ b/tests/tga/bug00248a.tga
Binary files differ