#4003 closed defect (fixed)

lwpoly_construct_circle: Division by zero

Reported by: Algunenano Owned by: strk
Priority: medium Milestone: PostGIS 2.5.0
Component: liblwgeom Version: trunk
Keywords: Cc:

Description

Delay calculating theta until after the number of segments is checked. Since the division by zero is undefined the compiler could optimize away the if (segments_per_quarter < 1) check.

Github PR: https://github.com/postgis/postgis/pull/199

Change History (3)

comment:1 Changed 18 months ago by pramsey

In 16362:

lwpoly_construct_circle: Avoid division by zero (Raúl Marín Rodríguez)
References #4003

comment:2 Changed 18 months ago by pramsey

In 16363:

lwpoly_construct_circle: Avoid division by zero (Raúl Marín Rodríguez)
References #4003

comment:3 Changed 18 months ago by pramsey

Resolution: fixed
Status: newclosed

In 16364:

lwpoly_construct_circle: Avoid division by zero (Raúl Marín Rodríguez)
Closes #4003
Closes #199

Note: See TracTickets for help on using tickets.