Skip to content

Prevents PLY from parsing duplicate defined elements - #5743

Merged
kimkulling merged 2 commits into
assimp:masterfrom
TinyTinni:fix-5738
Sep 4, 2024
Merged

kimkulling merged 2 commits into
assimp:masterfrom
TinyTinni:fix-5738

Conversation

@TinyTinni

Copy link
Copy Markdown
Contributor

Issue: #5729

Hi,
this is my take on trying to fix the issue.

Prevents the PLY parser from parsing elements which are already defined.

For example when the following occurs in the header:

element vertex 6
property ....
element vertex 8
element vertex 5

The crash occurs, when the duplicate vertex is bigger than the previous vertex declaration.

Since I cannot find and document which defines how the file format should behave, I choose to throw an error, preventing from loading the mesh since it is ambigious.

It is also compatible with the preivous fix for this issue.

@kimkulling kimkulling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

@kimkulling
kimkulling merged commit ff2dc2f into assimp:master Sep 4, 2024
@kimkulling

Copy link
Copy Markdown
Member

Merged, thanks a lot for your contribution.

kimkulling added a commit that referenced this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants