~ubuntu-branches/ubuntu/intrepid/libgd2/intrepid-security

« back to all changes in this revision

Viewing changes to tests/jpeg/jpeg_empty_file.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-12-06 17:02:21 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206170221-0h9h2222a7lzrnj1
Tags: 2.0.35.dfsg-3ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Drop unnecessary build dependency 'gnulib'.
  - maintainer field updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: jpeg_empty_file.c,v 1.1 2007/01/23 23:57:54 pajoye Exp $ */
 
1
/* $Id: jpeg_empty_file.c,v 1.1.2.3 2007/04/10 20:35:21 pajoye Exp $ */
2
2
#include "gd.h"
3
3
#include <stdio.h>
4
4
#include <stdlib.h>
8
8
{
9
9
        gdImagePtr im;
10
10
        FILE *fp;
 
11
        char path[1024];
11
12
 
12
 
        fp = fopen("empty.jpeg", "rb");
 
13
        sprintf(path, "%s/jpeg/empty.jpeg", GDTEST_TOP_DIR);
 
14
        fp = fopen(path, "rb");
13
15
        if (!fp) {
14
16
                printf("failed, cannot open file\n");
15
17
                return 1;