Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid NULL dereferencing before calling GEOSisEmpty #362

Closed
wants to merge 1 commit into from

Conversation

@Algunenano
Copy link
Member

commented Jan 18, 2019

Related to https://trac.osgeo.org/postgis/ticket/4275

I haven't been able to find a case when this crashed in my system, so it might be fixed with changes in the surrounding code (LWGEOM_GEOS_nodeLines?).

@Komzpa Komzpa self-requested a review Jan 18, 2019

@Komzpa

Komzpa approved these changes Jan 18, 2019

Copy link
Member

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.

@Algunenano

This comment has been minimized.

Copy link
Member Author

commented Jan 18, 2019

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.

strk pushed a commit that referenced this pull request Jan 18, 2019

Avoid passing a NULL pointer to GEOSisEmpty
Closes #4275
Closes #362


git-svn-id: http://svn.osgeo.org/postgis/branches/2.3@17177 b70326c6-7e19-0410-871a-916f4a2858ee

@Algunenano Algunenano closed this Jan 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.