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

Reduce the nullability bypasses in CryptoPool.Return #55782

Merged
merged 2 commits into from
Jul 18, 2021

Commits on Jul 15, 2021

  1. Reduce the nullability bypasses in CryptoPool.Return

    This is a walk over src/libraries/.../*.cs to find any calls to
    CryptoPool.Return which needed a "!" because of nullability
    flow.
    
    A couple of the bypasses were identifying legitimate issues,
    and were resolved by moving the Rent to the last thing before
    the try.
    
    A couple were because of the use of ArraySegment which
    can't structurally promise the array is non-null. But those
    were usually preceded by a call to ZeroMemory, and there
    is a CryptoPool.Return(ArraySegment) which does that
    already, so those "!"s were removed by changing to that
    overload.
    bartonjs committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    5a52ede View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2021

  1. Apply feedback

    Co-authored-by: Stephen Toub <stoub@microsoft.com>
    bartonjs and stephentoub committed Jul 16, 2021
    Configuration menu
    Copy the full SHA
    2a30bd4 View commit details
    Browse the repository at this point in the history