...
Code Block | ||
---|---|---|
| ||
public int processFile(String fileName) throws IOException, FileNotFoundException {
FileInputStream stream = new FileInputStream(fileName);
BufferedReader bufRead = new BufferedReader(stream);
String line;
while((line=bufRead.readLine())!=null) {
sendLine(line);
}
return 1;
}
|
...
Code Block | ||
---|---|---|
| ||
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sqlQuery);
processResults(rs);
} catch(SQLException e) { }
finally {
try {
if(rs != null) {
rs.close();
}
} catch(SQLException e) { }
try {
if(stmt != null) {
stmt.close();
}
} catch(SQLException e){}
}
|
...
Acquiring non-memory system resources and not releasing them explicitly might lead to resource exhaustion.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
FIO34-J | low | probable | medium | P4 | L3 |
Automated Detection
TODO
Related Vulnerabilities
...
Wiki Markup |
---|
\[[API 06|AA. Java References#API 06]\] [Class Object| http://java.sun.com/javase/6/docs/api/java/lang/Object.html] [http://www.ibm.com/developerworks/java/library/j-jtp03216.html] \---\- |