[cairo] [PATCH] fix a crash caused by finished SVG surface
Kouhei Sutou
kou at cozmixng.org
Wed Oct 30 13:45:21 CET 2013
Hi,
In <20131029215901.GE478 at bryceharrington.org>
"Re: [cairo] [PATCH] fix a crash caused by finished SVG surface" on Tue, 29 Oct 2013 21:59:05 +0000,
"Bryce W. Harrington" <b.harrington at samsung.com> wrote:
> Looks good to me. I can commit if no one else has any objections.
>
> Reviewed-by: Bryce Harrington <b.harrington at samsung.com>
Thanks!!!
--
kou
> 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.
>>
>> 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
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list