Skip to content

Commit 87523bf

Browse files
committed
forgot slice allocation pattern
1 parent efd1a5f commit 87523bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

controllers/vulndb_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ type ecosystemRow struct {
217217

218218
// return the number of vulnerabilities in affected packages per ecosystem
219219
func (c VulnDBController) GetCVEEcosystemDistribution(ctx shared.Context) error {
220-
cveResults := make([]ecosystemRow, 1024)
221-
maliciousPackageResults := make([]ecosystemRow, 64)
220+
cveResults := make([]ecosystemRow, 0, 1024)
221+
maliciousPackageResults := make([]ecosystemRow, 0, 64)
222222

223223
// get the amount of CVEs in affected packages per ecosystem
224224
cveSQL := `SELECT LOWER(b.ecosystem) as ecosystem, COUNT(*) FROM cve_affected_component a

0 commit comments

Comments
 (0)