mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
Fix unitialized variable issue when scanning file properties with libjson not configured.
This commit is contained in:
parent
434ea80d5c
commit
ac2bd61e61
1 changed files with 2 additions and 1 deletions
|
@ -2665,6 +2665,8 @@ static int magic_scandesc(cli_ctx *ctx, cli_file_t type)
|
|||
perf_start(ctx, PERFT_CACHE);
|
||||
if (!(SCAN_PROPERTIES))
|
||||
res = cache_check(hash, ctx);
|
||||
else
|
||||
res = CL_VIRUS;
|
||||
|
||||
#if HAVE_JSON
|
||||
if (SCAN_PROPERTIES /* ctx.options & CL_SCAN_FILE_PROPERTIES && ctx->wrkproperty != NULL */) {
|
||||
|
@ -2683,7 +2685,6 @@ static int magic_scandesc(cli_ctx *ctx, cli_file_t type)
|
|||
if (ret != CL_SUCCESS) {
|
||||
early_ret_from_magicscan(ret);
|
||||
}
|
||||
res = CL_VIRUS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue