[cairo] [PATCH] stroker: Check for scaling overflow in computing half line widths
Miguel Gomez
magomez at igalia.com
Wed Mar 29 12:19:38 UTC 2017
Resubmitting this to the list as I wasn't subscribed.
> > Would it be possible to a test that reproduces the issue?
>
> Yes, Miguel has a code snippet to reproduce the crash, it could
> perfectly be a test.
Thanks for working on this guys!!
This is the test I'm using to reproduce the crash:
===============================================
#include <cairo.h>
int main()
{
cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 64, 64);
cairo_t* cr = cairo_create(surface);
cairo_save(cr);
cairo_matrix_t matrix;
matrix.xx = 1.0;
matrix.yx = 0;
matrix.xy = 0;
matrix.yy = 4294967295.0;
matrix.x0 = 8.0;
matrix.y0 = -49392123873.00;
cairo_transform(cr, &matrix);
cairo_rectangle(cr, 0.5, 0.5, 29.0, 22.0);
cairo_set_line_width(cr, 1.0);
cairo_stroke(cr);
cairo_restore(cr);
cairo_destroy(cr);
cairo_surface_destroy(surface);
return 0;
}
===============================================
--
Miguel Gomez
Igalia - www.igalia.com
More information about the cairo
mailing list