Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from justcoding121/master
Browse files Browse the repository at this point in the history
#36 fix extension exist check
  • Loading branch information
justcoding121 authored Oct 11, 2018
2 parents edcaa90 + b175578 commit be2094d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StreamExtended/SslTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static async Task<bool> IsClientHello(CustomBufferedStream stream, IBuffe

Dictionary<string, SslExtension> extensions = null;

if(extenstionsStartPosition + 5 < recordLength)
if(extenstionsStartPosition < recordLength + 5)
{
extensions = await ReadExtensions(majorVersion, minorVersion, peekStream, bufferPool, cancellationToken);
}
Expand Down Expand Up @@ -326,7 +326,7 @@ public static async Task<bool> IsServerHello(CustomBufferedStream stream, IBuffe

Dictionary<string, SslExtension> extensions = null;

if (extenstionsStartPosition + 5 < recordLength)
if (extenstionsStartPosition < recordLength + 5)
{
extensions = await ReadExtensions(majorVersion, minorVersion, peekStream, bufferPool, cancellationToken);
}
Expand Down

0 comments on commit be2094d

Please sign in to comment.