mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +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
|
2004-11-08 Mikhail Khodjaiants
|
||||||
Added the "Automatically refresh registers" and "Automatically refresh shared libraries"
|
Added the "Automatically refresh registers" and "Automatically refresh shared libraries"
|
||||||
preferences and properties.
|
preferences and properties.
|
||||||
|
|
|
@ -188,13 +188,11 @@ public class TCPSettingsBlock extends Observable {
|
||||||
|
|
||||||
private boolean portNumberIsValid( String portNumber ) {
|
private boolean portNumberIsValid( String portNumber ) {
|
||||||
try {
|
try {
|
||||||
int port = Short.parseShort( portNumber );
|
int port = Integer.parseInt( portNumber );
|
||||||
if ( port < 0 )
|
return ( port > 0 && port <= 0xFFFF );
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
catch( NumberFormatException e ) {
|
catch( NumberFormatException e ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue