Adds --max-scantime clamscan option and MaxScanTime clamd config option.

--max-scantime replaces the --timelimit clamscan option that had been experimental.
Default max-scantime set to 2 minutes (120000 milliseconds).
This commit is contained in:
Micah Snyder (micasnyd) 2019-08-16 17:18:59 -07:00 committed by Micah Snyder
parent 83afeb7126
commit 6a0abb897a
14 changed files with 199 additions and 100 deletions

View file

@ -930,6 +930,11 @@ cl_error_t cli_unzip(cli_ctx *ctx)
ret = CL_EMAXFILES;
}
if (cli_checktimelimit(ctx) != CL_SUCCESS) {
cli_dbgmsg("cli_unzip: Time limit reached (max: %u)\n", ctx->engine->maxscantime);
ret = CL_ETIMEOUT;
}
/*
* Detect overlapping files and zip bombs.
*/