MB-65807: Graceful handling of non-conforming polygon data#2166
Merged
abhinavdangeti merged 2 commits into7.6.x-couchbasefrom Mar 18, 2025
Merged
MB-65807: Graceful handling of non-conforming polygon data#2166abhinavdangeti merged 2 commits into7.6.x-couchbasefrom
abhinavdangeti merged 2 commits into7.6.x-couchbasefrom
Conversation
Geo's "extract3DCoordinates" does not validation input data which
can cause mal-formed polygon data to cause a panic:
panic({0x100a9e0c0?, 0x140001163a8?})
/opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124
reflect.Value.Index({0x100a9ffe0?, 0x14000118c00?, 0x14000062c58?}, 0x1008913c8?)
/opt/homebrew/opt/go/libexec/src/reflect/value.go:1447 +0x170
github.com/blevesearch/bleve/v2/geo.extract3DCoordinates({0x100a9ffe0?, 0x14000118c00?})
/Users/abhinav.dangeti/Documents/go/src/github.com/blevesearch/bleve/geo/parse.go:245 +0x12c
github.com/blevesearch/bleve/v2/geo.ExtractGeoShapeCoordinates({0x100a9ffe0?, 0x14000118c00?}, {0x100a24659, 0x7})
See: https://pkg.go.dev/reflect#Value.IsValid
5eed955 to
31d07c6
Compare
CascadingRadium
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Geo's
extract3DCoordinatesdoes not validate input data which can cause malformed polygon data to cause a panic:See: https://pkg.go.dev/reflect#Value.IsValid