libclamav: added matchicon dconf

This commit is contained in:
Kevin Lin
2014-03-05 12:47:41 -05:00
parent 612629994c
commit e7da4f6568
3 changed files with 7 additions and 2 deletions

View File

@@ -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 },

View File

@@ -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

View File

@@ -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);