Re: [PATCH] fix a crash caused by finished SVG surface
"Bryce W. Harrington" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Oct 29, 2013 at 09:59:05PM +0000, Bryce W. Harrington wrote: > Looks good to me. I can commit if no one else has any objections. > > Reviewed-by: Bryce Harrington <[email protected]> > On Mon, Oct 28, 2013 at 10:42:47PM +0900, Kouhei Sutou wrote: > > Hi, > > > > I attach a patch that fix a crash that is caused by finished > > SVG surface. "cairo_create (finished_svg_surface)" is invalid > > usage but it will be better that reporting an error instead > > of crash. Committed, thanks > > Here is a program that reproduces this case: > > > > #include <cairo.h> > > #include <cairo-svg.h> > > > > int > > main(int argc, char **argv) > > { > > cairo_t *cr; > > cairo_surface_t *finished_surface; > > > > finished_surface = cairo_svg_surface_create ("/tmp/xxx.svg", 1.0, 1.0); > > cairo_surface_finish (finished_surface); > > > > cr = cairo_create (finished_surface); > > cairo_destroy (cr); > > > > cairo_surface_destroy (finished_surface); > > > > return 0; > > } > > > > We can use other paginated surface such as PDF surface for > > finished surface. > > > > > > This case is reported at rcairo's issue: > > https://github.com/rcairo/rcairo/issues/15 > > > > > > Thanks, > > -- > > kou > > > > -- > > cairo mailing list > > [email protected] > > http://lists.cairographics.org/mailman/listinfo/cairo > -- > cairo mailing list > [email protected] > http://lists.cairographics.org/mailman/listinfo/cairo -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo