Skip to content

Commit

Permalink
Merge 95b9624 into 1e647f6
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Dec 17, 2018
2 parents 1e647f6 + 95b9624 commit 7cff0ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/io/mola/galimatias/URLParser.java
Expand Up @@ -658,7 +658,15 @@ else if (c == '#') {
if (buffer.length() == 0) {
port = -1;
} else {
port = Integer.parseInt(buffer.toString());
String portMsg = "Port number must be less than 65536";
try {
port = Integer.parseInt(buffer.toString());
if (port > 65535) {
handleError(portMsg);
}
} catch (NumberFormatException e) {
handleError(portMsg);
}
}
if (stateOverride != null) {
terminate = true;
Expand Down

0 comments on commit 7cff0ea

Please sign in to comment.