Skip to content

Commit e26b016

Browse files
timopollmeierbjoernricks
authored andcommitted
Fix: Allow missing cpeMatch in CVE configurations
The CVEs feed can contain configurations without a cpeMatch field if a CVE only affects products for which no CPE has been assigned.
1 parent 0b3070b commit e26b016

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/manage_sql_secinfo.c

+8-3
Original file line numberDiff line numberDiff line change
@@ -3862,10 +3862,15 @@ get_cve_configuration_node_fields (cJSON* node_item,
38623862

38633863
*cpe_matches_array = cJSON_GetObjectItemCaseSensitive (node_item,
38643864
"cpeMatch");
3865-
if (!cJSON_IsArray (*cpe_matches_array))
3865+
if (*cpe_matches_array == NULL)
38663866
{
3867-
g_warning ("%s: cpeMatch missing or not an array for %s.",
3868-
__func__, cve_id);
3867+
g_debug ("%s: cpeMatch missing for %s.",
3868+
__func__, cve_id);
3869+
}
3870+
else if (!cJSON_IsArray (*cpe_matches_array))
3871+
{
3872+
g_warning ("%s: cpeMatch not an array for %s.",
3873+
__func__, cve_id);
38693874
return -1;
38703875
}
38713876

0 commit comments

Comments
 (0)