 
                            ...
| Code Block | ||
|---|---|---|
| 
 | ||
| 
public static long getInteger(DataInputStream is) throws IOException {
  return is.readInt() & 0xFFFFFFFFL;	
}
 | 
Risk Assessment
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
References
| Wiki Markup | 
|---|
| \[[API 06|AA. Java References#API 06]\] Class DataInputStream: method {{readInt}}
\[[Harold 97|AA. Java References#Harold 97]\] Chapter 2: Primitive Data Types, Cross Platform Issues, Unsigned Integers
\[[Hitchens 02|AA. Java References#Hitchens 02]\] 2.4.5 Accessing Unsigned Data | 
...
INT00-J. Provide methods to read and write Little-Endian data       06. Integers (INT)       INT30-J. Range check before casting integers to narrower types