Repository: dependency-check/DependencyCheck (language: java)

Issue:
Dependency-check 10.0.0 hosted DB errors
**Describe the bug**
After upgrading the schema from https://github.com/jeremylong/DependencyCheck/blob/main/core/src/main/resources/data/initialize_postgres.sql and dependency-check 10.0.0 version I have dropped the full DB and created it from scratch, but when updating the CVEs I always get this error:

[ERROR] Failed to process CVE-2000-0564
org.owasp.dependencycheck.analyzer.exception.UnexpectedAnalysisException: org.postgresql.util.PSQLException: The column index is out of range: 71, number of columns: 70.
	at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability(CveDB.java:1406)
	at org.owasp.dependencycheck.data.nvdcve.CveDB.updateVulnerability(CveDB.java:1100)
	at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.updateCveDb(NvdApiProcessor.java:119)
	at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call(NvdApiProcessor.java:96)
	at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call(NvdApiProcessor.java:40)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: org.postgresql.util.PSQLException: The column index is out of range: 71, number of columns: 70.
	at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:225)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:521)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:521)
	at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability(CveDB.java:1383)
	... 8 common frames omitted

**Version of dependency-check used**
The problem occurs using version 10.0.0 of the CLI

**Log file**
When reporting errors, 99% of the time log file output is required. Please post the log file as a [gist](https://gist.github.com/) and provide a link in the new issue.

**To Reproduce**
Steps to reproduce the behavior:
./dependency-check.sh --dbDriverName org.postgresql.Driver --connectionString jdbc:postgresql://localhost/audit --dbUser test --dbPassword test --updateonly --nvdApiKey $API_KEY

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.



Discussion / hints:
For postgresql, the problem is the same.
yes, in my case I use postgresql 
I will publish 10.0.1 shortly. Sorry about the typo.

Fix patch:
diff --git a/core/src/main/resources/data/dbStatements_postgresql.properties b/core/src/main/resources/data/dbStatements_postgresql.properties
index 8c8d7b507cb..2f9c3c0c31c 100644
--- a/core/src/main/resources/data/dbStatements_postgresql.properties
+++ b/core/src/main/resources/data/dbStatements_postgresql.properties
@@ -15,7 +15,7 @@
 MERGE_PROPERTY=SELECT save_property(?, ?);
 CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE NOT EXISTS (SELECT * FROM software WHERE cpeEntry.id = software.CPEEntryId);
 INSERT_SOFTWARE=SELECT insert_software(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-UPDATE_VULNERABILITY=SELECT update_vulnerability(?::VARCHAR(20), ?::VARCHAR(8000), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::BOOLEAN, ?::BOOLEAN, ?:: BOOLEAN, ?::BOOLEAN, ?::BOOLEAN, ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(5),?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(5), ?::VARCHAR(5), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(20), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15));
+UPDATE_VULNERABILITY=SELECT update_vulnerability(?::VARCHAR(20), ?::VARCHAR(8000), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::BOOLEAN, ?::BOOLEAN, ?:: BOOLEAN, ?::BOOLEAN, ?::BOOLEAN, ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(5),?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(5), ?::VARCHAR(5), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(20), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::VARCHAR(50), ?::VARCHAR(15));
 
 MERGE_CPE_ECOSYSTEM=SELECT merge_ecosystem(?, ?, ?);
 MERGE_KNOWN_EXPLOITED=CALL merge_knownexploited(?,?,?,?,?,?,?,?,?);


Test patch: