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

offset overflow on 32-bit systems #8

Open
williambrode opened this issue Jan 14, 2025 · 1 comment
Open

offset overflow on 32-bit systems #8

williambrode opened this issue Jan 14, 2025 · 1 comment

Comments

@williambrode
Copy link

Working with the code I noticed this:

type Chunker struct {
...
	offset int

Where offset is tracking the offset of this chunk inside the file. On a 32-bit system, offset would be limited to 2GB and would then overflow. This is problematic when dealing with large files. offset should be an int64 to prevent this issue.

@williambrode
Copy link
Author

I should mention the Chunk struct has the same field with the same issue.

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

No branches or pull requests

1 participant