Skip to content

MXF: fixed infinite loop in malformed files#2532

Open
TehMrCrowley wants to merge 1 commit into
MediaArea:masterfrom
TehMrCrowley:MXF_INFINTE_LOOP
Open

MXF: fixed infinite loop in malformed files#2532
TehMrCrowley wants to merge 1 commit into
MediaArea:masterfrom
TehMrCrowley:MXF_INFINTE_LOOP

Conversation

@TehMrCrowley
Copy link
Copy Markdown

While processing malformed MXF files, we observed that MediaInfo enters an infinite loop, repeatedly re-reading the same byte range and never returning from the query operation. This results in the calling application blocking indefinitely.

The issue was reproduced using the current 25.10 master branch. After investigation, we identified the root cause and implemented a fix in our fork.

In addition to resolving the infinite loop condition, we modified the query logic to return false when a malformed MXF structure is detected, allowing the caller to handle the error gracefully instead of hanging.

@JeromeMartinez
Copy link
Copy Markdown
Member

An element size of 0 may appear in other formats, and the action (stopping everything) is too hard, I aim to find a less binary solution.
Could you share a file demonstrating this issue? If not possible in public, drop a ail to info@mediaarea.net

@JeromeMartinez
Copy link
Copy Markdown
Member

Looks like that one of the commits added last week now handle such case, the file you provided is now fine without this commit, please test master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants