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

transport: use uint32 to track chuck length #91

Merged
merged 1 commit into from
Jan 2, 2025
Merged

transport: use uint32 to track chuck length #91

merged 1 commit into from
Jan 2, 2025

Conversation

nemith
Copy link
Owner

@nemith nemith commented Jan 2, 2025

We can read a chunk up to the max uint32 size (4294967295) but we were storining this in the standard sized/arch dependant type of int. On 64bit machines this value fits in a signed it, but it doesn't fix in on a signed32 bit.

Since this value can never be larger than uint32 this just adjusts all our chuck length tracking to use uint32.

Fixes: #90

@nemith nemith marked this pull request as ready for review January 2, 2025 13:45
@nemith nemith merged commit b935754 into main Jan 2, 2025
3 of 6 checks passed
@nemith nemith deleted the 32bitsupport branch January 2, 2025 13:45
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.

maxChunk overflows int when try to build to 32-bit device
1 participant