mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-19 18:17:13 +01:00
improved performance and made a change to support fixing issue #20
Former-commit-id: 8c8ba03b948d9f61ee43bca267a0ea7e497dae2a
This commit is contained in:
@@ -443,14 +443,17 @@ public class CveDB {
|
|||||||
final String previous = rs.getString(3);
|
final String previous = rs.getString(3);
|
||||||
if (!cveEntries.contains(cveId) && isAffected(cpe.getVendor(), cpe.getProduct(), detectedVersion, cpeId, previous)) {
|
if (!cveEntries.contains(cveId) && isAffected(cpe.getVendor(), cpe.getProduct(), detectedVersion, cpeId, previous)) {
|
||||||
cveEntries.add(cveId);
|
cveEntries.add(cveId);
|
||||||
|
final Vulnerability v = getVulnerability(cveId);
|
||||||
|
v.setMatchedCPE(cpeId, previous);
|
||||||
|
vulnerabilities.add(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUtils.closeResultSet(rs);
|
DBUtils.closeResultSet(rs);
|
||||||
DBUtils.closeStatement(ps);
|
DBUtils.closeStatement(ps);
|
||||||
for (String cve : cveEntries) {
|
// for (String cve : cveEntries) {
|
||||||
final Vulnerability v = getVulnerability(cve);
|
// final Vulnerability v = getVulnerability(cve);
|
||||||
vulnerabilities.add(v);
|
// vulnerabilities.add(v);
|
||||||
}
|
// }
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
throw new DatabaseException("Exception retrieving vulnerability for " + cpeStr, ex);
|
throw new DatabaseException("Exception retrieving vulnerability for " + cpeStr, ex);
|
||||||
|
|||||||
Reference in New Issue
Block a user