wo80 / Triangle

CMake project for Jonathan Shewchuk's Triangle mesh generator.
Other
63 stars 26 forks source link

Fix memory allocation in acute #3

Closed wo80 closed 9 years ago

wo80 commented 9 years ago

In splitConvexPolygon memory is allocated as REAL poly1[100], but it gets returned as a pointer to the calling function halfPlaneIntersection. This is invalid, since the (stack) memory will be released as soon as the function returns.

Use malloc in halfPlaneIntersection and free it properly.

wo80 commented 9 years ago

Fixed in 2d704ed40263f0c391f1a7e2ffb1b4aedcde727a