Skip to content

Commit 1e68c5b

Browse files
author
Dominik Schiener
committed
Fix | TdsParser.ProcessSSPI clear receivedBuff array after negTokenResp retrieval
1 parent bc2a834 commit 1e68c5b

File tree

1 file changed

+2
-0
lines changed
  • src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient

1 file changed

+2
-0
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ internal void ProcessSSPI(int receivedLength)
2525
throw SQL.SynchronousCallMayNotPend();
2626
}
2727

28+
receivedBuff.AsSpan(receivedLength, receivedBuff.Length - receivedLength).Clear();
29+
2830
// allocate send buffer and initialize length
2931
byte[] rentedSendBuff = ArrayPool<byte>.Shared.Rent((int)_authenticationProvider!.MaxSSPILength);
3032
byte[] sendBuff = rentedSendBuff; // need to track these separately in case someone updates the ref parameter

0 commit comments

Comments
 (0)