mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Fix for bug 75627: Incorrect limit to port numbers.
This commit is contained in:
parent
d0408df257
commit
66b367c79f
2 changed files with 6 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-11-11 Mikhail Khodjaiants
|
||||
Fix for bug 75627: Incorrect limit to port numbers.
|
||||
* TCPSettingsBlock.java
|
||||
|
||||
2004-11-08 Mikhail Khodjaiants
|
||||
Added the "Automatically refresh registers" and "Automatically refresh shared libraries"
|
||||
preferences and properties.
|
||||
|
|
|
@ -188,13 +188,11 @@ public class TCPSettingsBlock extends Observable {
|
|||
|
||||
private boolean portNumberIsValid( String portNumber ) {
|
||||
try {
|
||||
int port = Short.parseShort( portNumber );
|
||||
if ( port < 0 )
|
||||
return false;
|
||||
int port = Integer.parseInt( portNumber );
|
||||
return ( port > 0 && port <= 0xFFFF );
|
||||
}
|
||||
catch( NumberFormatException e ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue