Skip to content

Guarding against empty polygons which would otherwise crash.#4

Open
DoctorLoki wants to merge 1 commit intovenicegeo:masterfrom
DoctorLoki:guard-against-empty-polygons
Open

Guarding against empty polygons which would otherwise crash.#4
DoctorLoki wants to merge 1 commit intovenicegeo:masterfrom
DoctorLoki:guard-against-empty-polygons

Conversation

@DoctorLoki
Copy link

When passing coords into the geos.NewPolygon calls, there was a lack of checking whether the coordsArray was empty before dereferencing that array, potentially causing crashes, e.g. while trying to unmarshal JSON. Adding these guards avoids the crashes and results in detectable errors instead.

@DoctorLoki
Copy link
Author

@jyutzler Maybe you could take a look at this simple change request?

@jyutzler
Copy link
Contributor

jyutzler commented Sep 8, 2019

Sorry, I am no longer affiliated with this project. @matthewhanson @smesdaghi can you take a look?

@DoctorLoki
Copy link
Author

Thanks Jeff! Any word from @matthewhanson or @smesdaghi yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants