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.
DwgPrototype1bReader.readDataFieldstakes the size limit of a record from the header that follows it in the list, but the headers are not always stored in the order of their records. In a 2013 DWG saved by DWG TrueView the local offsets were 10982, 0, 5491, 11026: for the first record the subtraction wraps around, the blob marker 0xBB106BB1 passes the inline check andReadBytesthrows anOverflowException. As with #1305, the exception stops the whole section and noModelerGeometryin the drawing gets itsAcisData.The limit now comes from the closest larger offset among all the headers, or from the end of the segment when there is none. The order of the headers doesn't change. The obsolete reader sorted the headers by offset before the same calculation, which is why it could read these files.
With the fix the payloads match the ones from the obsolete
DataStoragereader on that drawing and on the other 2013+ DWG files with solids I have, and the test suite passes.