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

skip invalid seek offset #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davibe
Copy link

@davibe davibe commented Aug 30, 2023

I came across (broken) content where the "+" would fail with overflow. The lib should not panic in this case.

@k0nserv
Copy link

k0nserv commented Aug 30, 2023

I wonder if this is fixing the underlying cause or just papering over something else. These are two u64s that are being added here, the resulting values is used as a byte offset for seeking. I don't think it's reasonable for this to overflow at all, even just 2^32 would be a 4Gb file.

It seems likely that something about reading segment_pos or element.position goes wrong and results in an unreasonable value, which in turn causes the overflow.

@dedobbin
Copy link
Contributor

dedobbin commented Sep 2, 2023

Could you share the file that caused this issue? I'm curious to see if it is indeed an underlying issue. Also i think if we roll with this, the println! should be a debug! or warn!

@k0nserv
Copy link

k0nserv commented Sep 6, 2023

Could you share the file that caused this issue? I'm curious to see if it is indeed an underlying issue.

Unfortunately I can't. However, it's our own custom software stack, not any established MKV too, that generates the file, it's possible that there's an error in the our output.

I'll try to debug this at some point, but I have no timeline for that.

Also i think if we roll with this, the println! should be a debug! or warn!

Agreed, I made it info! in our fork

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.

None yet

3 participants