diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-2.1.1/tests/png/bug00033.c')
-rw-r--r-- | Build/source/libs/gd/libgd-2.1.1/tests/png/bug00033.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-2.1.1/tests/png/bug00033.c b/Build/source/libs/gd/libgd-2.1.1/tests/png/bug00033.c new file mode 100644 index 00000000000..f7e90f0824c --- /dev/null +++ b/Build/source/libs/gd/libgd-2.1.1/tests/png/bug00033.c @@ -0,0 +1,32 @@ +/* $Id$ */ +#include "gd.h" +#include <stdio.h> +#include <stdlib.h> +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + FILE *fp; + char path[1024]; + + gdSetErrorMethod(gdSilence); + + sprintf(path, "%s/png/bug00033.png", GDTEST_TOP_DIR); + fp = fopen(path, "rb"); + if (!fp) { + printf("failed, cannot open file <%s>\n", path); + return 1; + } + + im = gdImageCreateFromPng(fp); + fclose(fp); + + if (im) { + gdImageDestroy(im); + return 1; + } else { + return 0; + } + +} |