Bug 3863

Summary: segmentation fault on cairo_image_surface_create_from_png_stream()
Product: cairo Reporter: Steve Chaplin <d74n5pohf9>
Component: png functionsAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 0.9.3   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Steve Chaplin 2005-07-25 04:10:21 UTC
Using cairo_image_surface_create_from_png_stream() gives a segmentation fault.
Inline patch below, should be easy to verify by quickly looking at the source

Index: src/cairo-png.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-png.c,v
retrieving revision 1.16
diff -u -u -r1.16 cairo-png.c
--- src/cairo-png.c     14 Jul 2005 18:24:56 -0000      1.16
+++ src/cairo-png.c     24 Jul 2005 18:04:04 -0000
@@ -489,6 +489,6 @@
     png_closure.read_func = read_func;
     png_closure.closure = closure;

-    return read_png (stream_read_func, &closure);
+    return read_png (stream_read_func, &png_closure);
 }
Comment 1 Carl Worth 2005-07-28 02:23:42 UTC
2005-07-27  Carl Worth  <cworth@cworth.org>

        * src/cairo-png.c: (cairo_image_surface_create_from_png_stream):
        Fix typo that caused cairo_image_surface_create_from_png_stream to
        segfault. Closes bug #3863 (thanks to Steve Chaplin).

        * test/.cvsignore:
        * test/Makefile.am:
        * test/create-from-png-stream-ref.png:
        * test/create-from-png-stream.c:
        * test/create-from-png.c: Add a test to actually call
        cairo_image_surface_create_from_png_stream.
Comment 2 Carl Worth 2005-08-22 17:15:28 UTC
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.