Skip to content

Commit

Permalink
make sure to use correct length
Browse files Browse the repository at this point in the history
  • Loading branch information
twsouthwick committed Feb 3, 2025
1 parent 43ec92d commit 7b7ee36
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ protected override void GenerateSspiClientContext(ReadOnlySpan<byte> incomingBlo
SNIHandle handle = _physicalStateObj.SessionHandle.NativeHandle;
#endif

var outBuff = outgoingBlobWriter.GetSpan((int)s_maxSSPILength);
uint sendLength = 0;
// This must start as the length of the input, but will be updated by the call to SNISecGenClientContext to the written length
var sendLength = s_maxSSPILength;
var outBuff = outgoingBlobWriter.GetSpan((int)sendLength);

if (0 != SniNativeWrapper.SNISecGenClientContext(handle, incomingBlob, outBuff, ref sendLength, _sniSpnBuffer[0]))
{
Expand Down

0 comments on commit 7b7ee36

Please sign in to comment.