Opened 7 years ago

Closed 7 years ago

#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: master
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 by pramsey, 7 years ago

In 16362:

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

comment:2 by pramsey, 7 years ago

In 16363:

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

comment:3 by pramsey, 7 years ago

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.