Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid NULL dereferencing before calling GEOSisEmpty #362
Komzpa left a comment
I think around these lines there was a call to GEOSUnion of geometry and its first point, to perform noding. It crashed for some reason when I tried replacing it with GEOSNode and GEOSUnaryUnion, it may happen it was due to some lost NULL checks.
I think it was https://github.com/postgis/postgis/pull/362/files#diff-c7b7a1fb041447f7edd6b4615aa2ba08R576 since LWGEOM_GEOS_makeValidLine calls LWGEOM_GEOS_nodeLines. I'll add the NULL checks in all stable branches just in case.