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

fix(client): prevent out-of-range slice access #1569

Merged
merged 5 commits into from
Jan 23, 2024

Commits on Jan 19, 2024

  1. fix(client): prevent out-of-range slice access

    The Quic Network Simulator `handshakeloss` testcase instructs the `neqo-client`
    to download from multiple URLs in series. The client takes one URL after the
    next and tries to request it:
    
    ``` rust
    to_request = &remaining[..1];
    remaining = &remaining[1..];
    ```
    
    This will panic on the last URL, trying to access the first element in an empty
    slice.
    
    This commit removes the out-of-range access. Instead of using slice operations
    which hide potential panics, it uses owned collections (`VecDeque` and `Vec`)
    and their safe methods (e.g. `pop_front`, `drain`).
    mxinden committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    d859022 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Pass VecDeque

    mxinden committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    ad02584 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0975fc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    25dd1a8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    526fb0e View commit details
    Browse the repository at this point in the history