Minor changes

SIP003 server port validation
Year 2018
This commit is contained in:
celeron533
2018-01-29 21:23:41 +08:00
2 changed files with 2 additions and 2 deletions
@@ -43,7 +43,7 @@ namespace Shadowsocks.Controller.Service
{
throw new ArgumentException("Value cannot be null or whitespace.", nameof(serverAddress));
}
if ((ushort)serverPort != serverPort)
if (serverPort <= 0 || serverPort > 65535)
{
throw new ArgumentOutOfRangeException("serverPort");
}