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

Cast size as int64 to remove overflow checks #605

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Cast size as int64 to remove overflow checks #605

merged 4 commits into from
Oct 12, 2023

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Oct 11, 2023

Three small fixes:

  • io.ReadFull on prefixes can't return an io.EOF if prefixBytes > 0
  • Cast size to int64 over int to avoid the overflow check
  • prefixBytesRead must equal 5 on success

@emcfarlane emcfarlane self-assigned this Oct 11, 2023
envelope.go Show resolved Hide resolved
envelope.go Outdated Show resolved Hide resolved
emcfarlane and others added 2 commits October 12, 2023 15:24
Co-authored-by: Akshay Shah <akshayjshah@users.noreply.github.com>
@akshayjshah akshayjshah merged commit 96effed into main Oct 12, 2023
8 checks passed
@akshayjshah akshayjshah deleted the ed/size64 branch October 12, 2023 17:51
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