mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
Excel (XLM, VBA): Remove allmatch checks + some code cleanup
And fixed a couple of conditions where critical scan errors may be ignored.
This commit is contained in:
parent
4e0adaad80
commit
2f49080847
2 changed files with 33 additions and 51 deletions
|
@ -1720,15 +1720,25 @@ int cli_scan_ole10(int fd, cli_ctx *ctx)
|
|||
free(fullname);
|
||||
return CL_ECREAT;
|
||||
}
|
||||
|
||||
cli_dbgmsg("cli_decode_ole_object: decoding to %s\n", fullname);
|
||||
|
||||
ole_copy_file_data(fd, ofd, object_size);
|
||||
|
||||
lseek(ofd, 0, SEEK_SET);
|
||||
|
||||
ret = cli_magic_scan_desc(ofd, fullname, ctx, NULL, LAYER_ATTRIBUTES_NONE);
|
||||
|
||||
close(ofd);
|
||||
if (ctx && !ctx->engine->keeptmp)
|
||||
if (cli_unlink(fullname))
|
||||
ret = CL_EUNLINK;
|
||||
|
||||
if (ctx && !ctx->engine->keeptmp) {
|
||||
if (cli_unlink(fullname)) {
|
||||
cli_dbgmsg("cli_decode_ole_object: Failed to remove temp file: %s\n", fullname);
|
||||
}
|
||||
}
|
||||
|
||||
free(fullname);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue