Skip to content

Commit

Permalink
Make cl_cvdgetage check skip any file that is not CVD or CLD.
Browse files Browse the repository at this point in the history
  • Loading branch information
userwiths committed Jul 16, 2024
1 parent f6cfadf commit 8474e6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libclamav/cvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions libclamav/readdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
( \
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8474e6a

Please sign in to comment.