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

FuelP2P RequestResponse - Check conversions from usize to u64 #2459

Open
acerone85 opened this issue Nov 26, 2024 · 0 comments
Open

FuelP2P RequestResponse - Check conversions from usize to u64 #2459

acerone85 opened this issue Nov 26, 2024 · 0 comments

Comments

@acerone85
Copy link
Contributor

Context

We currently define

pub struct PostcardCodec {
    /// Used for `max_size` parameter when reading Response Message
    /// Necessary in order to avoid DoS attacks
    /// Currently the size mostly depends on the max size of the Block
    max_response_size: usize,
}

but we always convert max_response_size to a u64 when reading it. We should define max_response_size to be a u64 directly.

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