diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-15 22:05:43 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-15 22:05:43 +0100 |
commit | fe424197da2dd66f271efc6e5807b4cf5a70376c (patch) | |
tree | 3f91a2024f59a22b2b5b3871686e7d1e114b11b0 /app/src | |
parent | 053ca232aaa386b6f6de2921ec26f980658438bf (diff) |
InetEndpoint: disallow huge ports
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/wireguard/config/InetEndpoint.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/config/InetEndpoint.java b/app/src/main/java/com/wireguard/config/InetEndpoint.java index f64bc25a..5f6a90d5 100644 --- a/app/src/main/java/com/wireguard/config/InetEndpoint.java +++ b/app/src/main/java/com/wireguard/config/InetEndpoint.java @@ -51,7 +51,7 @@ public final class InetEndpoint { } catch (final URISyntaxException e) { throw new IllegalArgumentException(e); } - if (uri.getPort() < 0) + if (uri.getPort() < 0 || uri.getPort() > 65535) throw new ParseException(InetEndpoint.class, endpoint, "Missing/invalid port number"); try { InetAddresses.parse(uri.getHost()); |