summaryrefslogtreecommitdiff
path: root/tests/jpeg/jpeg_empty_file.c
blob: 12ce24110c4b946b59aaee019f8d789338684c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "gd.h"
#include <stdio.h>
#include <stdlib.h>
#include "gdtest.h"

int main()
{
	gdImagePtr im;
	FILE *fp;

	gdSetErrorMethod(gdSilence);

	fp = gdTestFileOpen("jpeg/empty.jpeg");
	im = gdImageCreateFromJpeg(fp);
	fclose(fp);

	if (!im) {
		return 0;
	} else {
		gdImageDestroy(im);
		return 1;
	}
}