Repository navigation
Conversation
This branch has not been deployed
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.
PlyDecoder::DecodeVertexData reads x/y/z, nx/ny/nz and red/green/blue/alpha through PlyPropertyReader::ReadValue(i) for every vertex, assuming one scalar per vertex, but the header may declare any of them as a list (
property list uchar float x). PlyReader then stores only the list elements, so the property's data can hold fewer than num_entries values and ReadValue reads past the end of the heap buffer. an ascii file withelement vertex 4, a list-typed x and four0 1 2rows crashes ReadPointCloudFromFile/draco_encoder (access violation before the patch, empty data vector). the check lives in DecodeVertexData because that is where the one-value-per-vertex assumption is made; positions and colors now fail like the existing wrong-type cases, list normals are skipped like non-float normals. PlyDecoderTest.TestListVertexPropertyRejected covers it and draco_tests passes (205 tests).