Chromium Code Reviews| Index: net/base/net_util.cc |
| diff --git a/net/base/net_util.cc b/net/base/net_util.cc |
| index b9cf59f1789a910bed6242794417f5592f0694f1..d8ef1bedd96b9654c5f6fba668df8c0d48946c86 100644 |
| --- a/net/base/net_util.cc |
| +++ b/net/base/net_util.cc |
| @@ -301,7 +301,7 @@ bool IsPortAllowedByDefault(int port) { |
| return false; |
| } |
| } |
| - return true; |
| + return port >= 0 && port <= 65535; |
|
mmenke
2014/11/18 21:06:39
return IsPortValid(port);
(New function, inspire
Peter Kasting
2014/11/18 23:38:42
Done.
|
| } |
| bool IsPortAllowedByFtp(int port) { |
| @@ -568,7 +568,7 @@ bool GetIPAddressFromSockAddr(const struct sockaddr* sock_addr, |
| *address = reinterpret_cast<const uint8*>(&addr->btAddr); |
| *address_len = kBluetoothAddressSize; |
| if (port) |
| - *port = addr->port; |
| + *port = static_cast<uint16>(addr->port); |
| return true; |
| } |
| #endif |