Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

golang/geo
master @ 7c0e844
3
Fixes
0
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Denial of Service: 3 prior fixes. Scrutinize any change in this area.
s2/polygon.go: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: During polygon decoding, invalid input could specify oversized loop counts. Because of an integer overflow and a missing return statement on error, the parser would allocate excessive memory via make([]*Loop, nloops), leading to an out-of-memory panic.
Denial of Service: Compressed polyline decoding suffered from integer overflow vulnerabilities where large varints (e.g. 1<<63) cast to standard 'int' bypassed array bounds checks, resulting in out-of-bounds panics at target[idx].
Denial of Service: Calling Polygon.Invert could result in an index out-of-bounds panic in iteratorContainsPoint because vertex, edge, and cumulative edge counters on polygon structures were not properly reset during reinitialization.