[PATCH] d2d1: Fix the stack overflow error caused by d2d_cdt_triangulate().

Henri Verbeet hverbeet at gmail.com
Mon Aug 30 08:09:07 CDT 2021

On Mon, 30 Aug 2021 at 09:48, 陈长胜 <chenchangsheng at uniontech.com> wrote:
> When vertex_count==1 or 0, d2d_cdt_triangulate will always be called by itself, causing stack overflow error.

How does it end up getting called like that, do you have a test?

If I had to guess, I suppose it's possible that we end up with less
than three vertices after eliminating duplicates in
d2d_path_geometry_triangulate(). In that case though, it would make
more sense to move the vertex count check in that function after the
duplicate elimination.

More information about the wine-devel mailing list