diff options
Diffstat (limited to 'Build/source/libs/gd/gd-2.0.35/tests/png/bug00011.c')
-rw-r--r-- | Build/source/libs/gd/gd-2.0.35/tests/png/bug00011.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Build/source/libs/gd/gd-2.0.35/tests/png/bug00011.c b/Build/source/libs/gd/gd-2.0.35/tests/png/bug00011.c new file mode 100644 index 00000000000..b951e5330b1 --- /dev/null +++ b/Build/source/libs/gd/gd-2.0.35/tests/png/bug00011.c @@ -0,0 +1,28 @@ +/* $Id: bug00011.c,v 1.1.2.2 2007/04/10 20:32:37 pajoye Exp $ */ +#include "gd.h" +#include <stdio.h> +#include <stdlib.h> +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + FILE *fp; + char path[2048]; + + sprintf(path, "%s/png/emptyfile", GDTEST_TOP_DIR); + printf("opening %s\n", path); + fp = fopen(path, "rb"); + if (!fp) { + printf("failed, cannot open file\n"); + return 1; + } + im = gdImageCreateFromPng(fp); + fclose(fp); + + if (!im) { + return 0; + } else { + return 1; + } +} |