mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
Compare commits
7 commits
82a321a589
...
ac34e12bac
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ac34e12bac | ||
![]() |
50326da519 | ||
![]() |
b1c1f1840c | ||
![]() |
1a2515eea9 | ||
![]() |
0462dae12a | ||
![]() |
3bd6c575c2 | ||
![]() |
63997273a8 |
3 changed files with 11 additions and 12 deletions
|
@ -418,11 +418,7 @@ static cl_error_t cli_scanrar_file(const char *filepath, int desc, cli_ctx *ctx)
|
|||
* File should be extracted...
|
||||
* ... make sure we have read permissions to the file.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
if (0 != _access_s(extract_fullpath, R_OK)) {
|
||||
#else
|
||||
if (0 != access(extract_fullpath, R_OK)) {
|
||||
#endif
|
||||
cli_dbgmsg("RAR: Don't have read permissions, attempting to change file permissions to make it readable..\n");
|
||||
#ifdef _WIN32
|
||||
if (0 != _chmod(extract_fullpath, _S_IREAD)) {
|
||||
|
@ -533,17 +529,11 @@ static cl_error_t cli_scanrar(cli_ctx *ctx)
|
|||
char *tmpname = NULL;
|
||||
int tmpfd = -1;
|
||||
|
||||
#ifdef _WIN32
|
||||
if ((SCAN_UNPRIVILEGED) ||
|
||||
(NULL == ctx->fmap->path) ||
|
||||
(0 != _access_s(ctx->fmap->path, R_OK)) ||
|
||||
(ctx->fmap->nested_offset > 0) || (ctx->fmap->len < ctx->fmap->real_len)) {
|
||||
#else
|
||||
if ((SCAN_UNPRIVILEGED) ||
|
||||
(NULL == ctx->fmap->path) ||
|
||||
(0 != access(ctx->fmap->path, R_OK)) ||
|
||||
(ctx->fmap->nested_offset > 0) || (ctx->fmap->len < ctx->fmap->real_len)) {
|
||||
#endif
|
||||
|
||||
/* If map is not file-backed have to dump to file for scanrar. */
|
||||
status = fmap_dump_to_file(ctx->fmap, ctx->fmap->path, ctx->this_layer_tmpdir, &tmpname, &tmpfd, 0, SIZE_MAX);
|
||||
if (status != CL_SUCCESS) {
|
||||
|
|
|
@ -4950,7 +4950,7 @@ cl_error_t cli_extract_xlm_macros_and_images(const char *dir, cli_ctx *ctx, char
|
|||
}
|
||||
|
||||
if (CL_VIRUS == cli_scan_desc(out_fd, ctx, CL_TYPE_SCRIPT, false, NULL, AC_SCAN_VIR,
|
||||
NULL, "xlm-macro", tempfile, LAYER_ATTRIBUTES_NORMALIZED)) {
|
||||
NULL, "xlm-macro", tempfile, LAYER_ATTRIBUTES_NONE)) {
|
||||
status = CL_VIRUS;
|
||||
goto done;
|
||||
}
|
||||
|
|
|
@ -376,3 +376,12 @@
|
|||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
{
|
||||
<image-fuzzy-hash-png-decoder>
|
||||
Memcheck:Cond
|
||||
..
|
||||
fun:read_header_info<std::io::cursor::Cursor<&[u8]>>
|
||||
...
|
||||
fun:fuzzy_hash_calculate_image
|
||||
...
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue