mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-05-18 05:23:43 -04:00
libclamav: added matchicon dconf
This commit is contained in:
@@ -64,7 +64,7 @@ static struct dconf_module modules[] = {
|
||||
{ "PE", "MD5SECT", PE_CONF_MD5SECT, 1 },
|
||||
{ "PE", "UPX", PE_CONF_UPX, 1 },
|
||||
{ "PE", "FSG", PE_CONF_FSG, 1 },
|
||||
{ "PE", "SWIZZOR", PE_CONF_SWIZZOR, 1 },
|
||||
{ "PE", "SWIZZOR", PE_CONF_SWIZZOR, 1 },
|
||||
|
||||
{ "PE", "PETITE", PE_CONF_PETITE, 1 },
|
||||
{ "PE", "PESPIN", PE_CONF_PESPIN, 1 },
|
||||
@@ -78,6 +78,7 @@ static struct dconf_module modules[] = {
|
||||
{ "PE", "CATALOG", PE_CONF_CATALOG, 1 },
|
||||
{ "PE", "DISABLECERT", PE_CONF_DISABLECERT, 0 },
|
||||
{ "PE", "DUMPCERT", PE_CONF_DUMPCERT, 0 },
|
||||
{ "PE", "MATCHICON", PE_CONF_MATCHICON, 1 },
|
||||
|
||||
{ "ELF", NULL, 0x1, 1 },
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ struct cli_dconf {
|
||||
#define PE_CONF_CATALOG 0x10000
|
||||
#define PE_CONF_DISABLECERT 0x20000
|
||||
#define PE_CONF_DUMPCERT 0x40000
|
||||
#define PE_CONF_MATCHICON 0x80000
|
||||
|
||||
/* Archive flags */
|
||||
#define ARCH_CONF_RAR 0x1
|
||||
|
||||
@@ -546,7 +546,7 @@ int cli_checkfp(unsigned char *digest, size_t size, cli_ctx *ctx)
|
||||
|
||||
static int matchicon(cli_ctx *ctx, struct cli_exe_info *exeinfo, const char *grp1, const char *grp2)
|
||||
{
|
||||
icon_groupset iconset;
|
||||
icon_groupset iconset;
|
||||
|
||||
if(!ctx ||
|
||||
!ctx->engine ||
|
||||
@@ -556,6 +556,9 @@ static int matchicon(cli_ctx *ctx, struct cli_exe_info *exeinfo, const char *grp
|
||||
!exeinfo->res_addr
|
||||
) return CL_CLEAN;
|
||||
|
||||
if (!(ctx->dconf->pe & PE_CONF_MATCHICON))
|
||||
return CL_CLEAN;
|
||||
|
||||
cli_icongroupset_init(&iconset);
|
||||
cli_icongroupset_add(grp1 ? grp1 : "*", &iconset, 0, ctx);
|
||||
cli_icongroupset_add(grp2 ? grp2 : "*", &iconset, 1, ctx);
|
||||
|
||||
Reference in New Issue
Block a user