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

Handle uint8 overflow #363

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Handle uint8 overflow #363

merged 1 commit into from
Mar 19, 2024

Conversation

ian-shim
Copy link
Contributor

Why are these changes needed?

Handle int overflow when validating security params

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@ian-shim ian-shim requested review from mooselumph and jianoaix March 19, 2024 05:06
@@ -30,7 +30,7 @@ func (*authenticator) AuthenticateBlobRequest(header core.BlobAuthHeader) error
sig := header.AuthenticationData

// Ensure the signature is 65 bytes (Recovery ID is the last byte)
if sig == nil || len(sig) != 65 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need a nil check for a slice

@ian-shim ian-shim marked this pull request as ready for review March 19, 2024 05:07
@ian-shim ian-shim merged commit 1438b7c into Layr-Labs:master Mar 19, 2024
6 checks passed
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.

2 participants