boostorg / boostorg/boost

In Boost v1.87 boost::geometry::intersection can fail if the two polygons share some identical vertices

Open
#998 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

Godbolt [example](https://godbolt.org/z/vP3MY7a6b)

Image

Two polygons are specified in the example above that almost completely overlap. However calling boost::geometry::intersection() on these two polygons in Boost v1.87 does not register as an intersection, whereas it gave the correct result before in Boost v.186 and earlier.

I have found that adding a small 1e-12 perturbation to the vertices of one of the polygons in this example results in the intersection being correctly calculated in v.187, leading me to believe that the vulnerability here occurs when both polygons in the calculation share one or more identical vertices.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.