Skip to content

Commit 198162d

Browse files
committed
Use Pack.BigEndianToUInt16.
1 parent 043b78b commit 198162d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Renci.SshNet/ForwardedPortDynamic.NET.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ private bool HandleSocks5(Socket socket, IChannelDirectTcpip channel, TimeSpan t
449449
return false;
450450
}
451451

452-
var port = (uint)(portBuffer[0] * 256 + portBuffer[1]);
452+
var port = Pack.BigEndianToUInt16(portBuffer);
453453

454454
RaiseRequestReceived(host, port);
455455

0 commit comments

Comments
 (0)