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

Unsafe i32 to usize conversion from network data #2788

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Apr 17, 2023

  1. Unsafe i32 to usize conversion from network data

    This patch fixes the problem with uncheckd data
    conversion read from the network. Currently, code
    reads data from the network, converts it to
    i32, and then blindly converts it to usize (so -1
    gets converted to -1_usize and causes panic in
    debug build and huge memory use in release build).
    This is a major security vulnerability and easily
    reproducible using Python client implementation.
    
    The fix replaces all `as usize` casts to try_into
    style casts.
    Suman Thakur authored and axelexic committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    a3ad4cf View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. Fix formatting issue

    Fix formatting issue that causes build to fail!
    Suman Thakur authored and axelexic committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    5222205 View commit details
    Browse the repository at this point in the history