Skip to content

Conversation

quatrix
Copy link

@quatrix quatrix commented Aug 13, 2025

the main change is adding the check

            // Break if size zero BoxHeader, which can result in dead-loop.
            if s == 0 {
                break;
            }

in stbl.rs, the dead-loop indeed happened for me in production, a user uploaded a currupted mp4 file and the process got stuck in a tight 100% cpu usage loop.

also added this assert in skip_box as a catch all for all other possible bugs, i assume here that correct code won't try skipping box to the same place

    // if we're jumping to the same place, it's probably a bug in the caller
    assert!(size > 0);

all other changes are just applying clippy suggestions to make the tests pass.

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.

1 participant