mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-03 03:10:32 +01:00
Fix infinite-join test case (bug #8379)
The trick for this was to carefully ensure that the pen always has at least 4 vertices. There was a previous attempt at this in the code already but the test case had a combination of matrix and radius that resulted in a value that was just able to sneak past the previous check.
This commit is contained in:
parent
5b7a7f39ad
commit
10cd23d51f
1 changed files with 5 additions and 0 deletions
|
|
@ -270,7 +270,12 @@ _cairo_pen_vertices_needed (double tolerance,
|
|||
/* number of vertices must be even */
|
||||
if (num_vertices % 2)
|
||||
num_vertices++;
|
||||
|
||||
/* And we must always have at least 4 vertices. */
|
||||
if (num_vertices < 4)
|
||||
num_vertices = 4;
|
||||
}
|
||||
|
||||
return num_vertices;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue