Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: possible infinite loop and memory leak in metadata reader #1749

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

edusperoni
Copy link
Collaborator

Description

Previsouly we used if (childNodeDataId == childNodeData->nextSiblingId) { as a breaking out of the loop.

Usually this is fine, as it's generated A->B->C->C. The issue is that in some very specific scenarios the metadata will generate:

A->B->C->B

Which will generate an infinite loop.

Additionally, It's not uncommon to have:

A->B->C->F
D->E->F

Which would generate:

A->B->C->F (break)
D->E->F (break)

but since F already exists, then it would leak a MetadataTreeNode

@cla-bot cla-bot bot added the cla: yes label Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants