[cairo-commit] cairo/test .cvsignore, 1.36, 1.37 Makefile.am, 1.64, 1.65 create-from-png-stream-ref.png, NONE, 1.1 create-from-png-stream.c, NONE, 1.1 create-from-png.c, 1.6, 1.7

Carl Worth commit at pdx.freedesktop.org
Wed Jul 27 09:23:31 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv11477/test

Modified Files:
	.cvsignore Makefile.am create-from-png.c 
Added Files:
	create-from-png-stream-ref.png create-from-png-stream.c 
Log Message:

        * 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.


Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/cairo/test/.cvsignore,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- .cvsignore	15 Jul 2005 20:45:19 -0000	1.36
+++ .cvsignore	27 Jul 2005 16:23:29 -0000	1.37
@@ -9,6 +9,7 @@
 composite-integer-translate-over-repeat
 coverage
 create-from-png
+create-from-png-stream
 fill-and-stroke
 fill-rule
 filter-nearest-offset

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/test/Makefile.am,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- Makefile.am	18 Jul 2005 21:35:54 -0000	1.64
+++ Makefile.am	27 Jul 2005 16:23:29 -0000	1.65
@@ -6,6 +6,7 @@
 composite-integer-translate-over \
 composite-integer-translate-over-repeat \
 create-from-png			\
+create-from-png-stream		\
 fill-and-stroke			\
 fill-rule			\
 filter-nearest-offset		\
@@ -59,6 +60,7 @@
 composite-integer-translate-over-ref.png		\
 composite-integer-translate-over-repeat-ref.png		\
 create-from-png-ref.png			\
+create-from-png-stream-ref.png		\
 fill-and-stroke-ref.png			\
 fill-rule-ref.png			\
 filter-nearest-offset-ref.png		\
@@ -143,6 +145,7 @@
 composite_integer_translate_over_LDADD = $(LDADDS)
 composite_integer_translate_over_repeat_LDADD = $(LDADDS)
 create_from_png_LDADD = $(LDADDS)
+create_from_png_stream_LDADD = $(LDADDS)
 fill_and_stroke_LDADD = $(LDADDS)
 fill_rule_LDADD = $(LDADDS)
 filter_nearest_offset_LDADD = $(LDADDS)

--- NEW FILE: create-from-png-stream-ref.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: create-from-png-stream.c ---
(This appears to be a binary file; contents omitted.)

Index: create-from-png.c
===================================================================
RCS file: /cvs/cairo/cairo/test/create-from-png.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- create-from-png.c	14 Jul 2005 18:17:12 -0000	1.6
+++ create-from-png.c	27 Jul 2005 16:23:29 -0000	1.7
@@ -47,13 +47,15 @@
 	       "create-from-png-ref.png");
 
     surface = cairo_image_surface_create_from_png (filename);
-    free (filename);
 
     if (surface == NULL) {
 	cairo_test_log ("Error: failed to open file %s\n", filename);
+	free (filename);
 	return CAIRO_TEST_FAILURE;
     }
 
+    free (filename);
+
     cairo_set_source_surface (cr, surface, 0, 0);
     cairo_paint (cr);
 




More information about the cairo-commit mailing list