Skip to content

Commit

Permalink
Fix | TdsParser.ProcessSSPI clear receivedBuff array after negTokenRe…
Browse files Browse the repository at this point in the history
…sp retrieval
  • Loading branch information
Dominik Schiener committed Apr 9, 2024
1 parent bc2a834 commit 1e68c5b
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -25,6 +25,8 @@ internal void ProcessSSPI(int receivedLength)
throw SQL.SynchronousCallMayNotPend();
}

receivedBuff.AsSpan(receivedLength, receivedBuff.Length - receivedLength).Clear();

// allocate send buffer and initialize length
byte[] rentedSendBuff = ArrayPool<byte>.Shared.Rent((int)_authenticationProvider!.MaxSSPILength);
byte[] sendBuff = rentedSendBuff; // need to track these separately in case someone updates the ref parameter
Expand Down

0 comments on commit 1e68c5b

Please sign in to comment.