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:
Micah Snyder 2022-08-27 10:34:42 -07:00 committed by Micah Snyder
parent 4e0adaad80
commit 2f49080847
2 changed files with 33 additions and 51 deletions

View file

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