From 8474e6a86d45ba2b084bd7d3719947db90aa5543 Mon Sep 17 00:00:00 2001 From: "Stiliyan Tonev (Bark)" Date: Tue, 16 Jul 2024 09:07:28 +0300 Subject: [PATCH] Make cl_cvdgetage check skip any file that is not CVD or CLD. --- libclamav/cvd.c | 2 +- libclamav/readdb.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libclamav/cvd.c b/libclamav/cvd.c index 7e82b8f3c3..6d54dc7998 100644 --- a/libclamav/cvd.c +++ b/libclamav/cvd.c @@ -851,7 +851,7 @@ cl_error_t cl_cvdgetage(const char *path, time_t *age_seconds) if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, "..")) continue; - if (!CLI_DBEXT(dent->d_name) || CLI_DBEXT_IGNORE(dent->d_name)) + if (!CLI_DBEXT_SIGNATURE(dent->d_name)) continue; if (ends_with_sep) diff --git a/libclamav/readdb.h b/libclamav/readdb.h index ea8dc0ce9d..a353e2a7bc 100644 --- a/libclamav/readdb.h +++ b/libclamav/readdb.h @@ -81,10 +81,10 @@ struct cli_matcher; cli_strbcasestr(ext, ".ign") || \ cli_strbcasestr(ext, ".ign2") || \ cli_strbcasestr(ext, ".imp")) -#define CLI_DBEXT_IGNORE(ext) \ +#define CLI_DBEXT_SIGNATURE(ext) \ ( \ - cli_strbcasestr(ext, ".ign") || \ - cli_strbcasestr(ext, ".ign2")) + cli_strbcasestr(ext, ".cvd") || \ + cli_strbcasestr(ext, ".cld")) #else #define CLI_DBEXT(ext) \ ( \ @@ -124,10 +124,10 @@ struct cli_matcher; cli_strbcasestr(ext, ".ign") || \ cli_strbcasestr(ext, ".ign2") || \ cli_strbcasestr(ext, ".imp")) -#define CLI_DBEXT_IGNORE(ext) \ +#define CLI_DBEXT_SIGNATURE(ext) \ ( \ - cli_strbcasestr(ext, ".ign") || \ - cli_strbcasestr(ext, ".ign2")) + cli_strbcasestr(ext, ".cvd") || \ + cli_strbcasestr(ext, ".cld")) #endif char *cli_virname(const char *virname, unsigned int official);