When /tmp/test.png is a 0 byte file the following program produces the error: libpng error: Read Error Aborted #include <stdio.h> #include <cairo.h> #include <cairo-png.h> #define FILENAME "/tmp/test.png" int main (void) { cairo_surface_t *surface; FILE *file; int width, height; file = fopen (FILENAME, "w"); if (file == NULL) { fprintf (stderr, "Failed to open file %s for writing.\n", FILENAME); return 1; } surface = cairo_image_surface_create_for_png(file, &width, &height); return 0; }
Created attachment 2455 [details] [review] Here's a patch to address the problem
This problem has been fixed by the recent png changes in cvs.
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.