Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Implement new check to find WID-SEC advisories in the xml (backport #1874) #1875

Merged
merged 1 commit into from
Nov 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -5336,7 +5336,8 @@ get_cve_filename (char *item_id)
/**
* @brief Compute the filename where a given CERT-Bund Advisory can be found.
*
* @param[in] item_id CERT-Bund identifier without version ("CB-K??/????").
* @param[in] item_id CERT-Bund identifier without version
("CB-K??/????" or "WID-SEC-????-????")
*
* @return A dynamically allocated string (to be g_free'd) containing the
* path to the desired file or NULL on error.
Expand All @@ -5350,6 +5351,11 @@ get_cert_bund_adv_filename (char *item_id)
{
return g_strdup_printf (CERT_BUND_ADV_FILENAME_FMT, year);
}
if (sscanf (item_id, "WID-SEC-%d-%*s", &year) == 1 )
{
// new year format is YYYY thus subtract 2000 from the int
return g_strdup_printf (CERT_BUND_ADV_FILENAME_FMT, year - 2000);
}
return NULL;
}

Expand Down