mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 18:33:16 +00:00
Fix all-match mode bug in PE section hash scans
The PE section hash scanning code didn't implement the all-match check. While this check isn't the ideal implementation for all-match mode... (see the commit message for the previous commit) ...it's simple enough to add the all-match check here for now.
This commit is contained in:
parent
eee290a69e
commit
c24654d244
1 changed files with 9 additions and 5 deletions
|
@ -2847,13 +2847,17 @@ int cli_scanpe(cli_ctx *ctx)
|
||||||
if ((DCONF & PE_CONF_MD5SECT) && ctx->engine->hm_mdb) {
|
if ((DCONF & PE_CONF_MD5SECT) && ctx->engine->hm_mdb) {
|
||||||
ret = scan_pe_mdb(ctx, &(peinfo->sections[i]));
|
ret = scan_pe_mdb(ctx, &(peinfo->sections[i]));
|
||||||
if (ret != CL_CLEAN) {
|
if (ret != CL_CLEAN) {
|
||||||
// TODO Handle allmatch
|
if (ret == CL_VIRUS && !SCAN_ALLMATCHES) {
|
||||||
if (ret != CL_VIRUS)
|
cli_dbgmsg("------------------------------------\n");
|
||||||
|
cli_exe_info_destroy(peinfo);
|
||||||
|
return ret;
|
||||||
|
} else if (ret != CL_VIRUS) {
|
||||||
cli_errmsg("cli_scanpe: scan_pe_mdb failed: %s!\n", cl_strerror(ret));
|
cli_errmsg("cli_scanpe: scan_pe_mdb failed: %s!\n", cl_strerror(ret));
|
||||||
|
|
||||||
cli_dbgmsg("------------------------------------\n");
|
cli_dbgmsg("------------------------------------\n");
|
||||||
cli_exe_info_destroy(peinfo);
|
cli_exe_info_destroy(peinfo);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue