We treat found_possibly_unwanted as EMAX, except we can't cache
these at all, not even at their own reclevel, and we certainly can't cache
level0 (since we know it'll be virus).
We are still caching siblings in an archive, as long as they don't hit emax
themselves.
... | ... |
@@ -655,6 +655,8 @@ void cache_add(unsigned char *md5, size_t size, cli_ctx *ctx) { |
655 | 655 |
return; |
656 | 656 |
|
657 | 657 |
level = (*ctx->fmap && (*ctx->fmap)->dont_cache_flag) ? ctx->recursion : 0; |
658 |
+ if (ctx->found_possibly_unwanted && (level || !ctx->recursion)) |
|
659 |
+ return; |
|
658 | 660 |
c = &ctx->engine->cache[key]; |
659 | 661 |
if(pthread_mutex_lock(&c->mutex)) { |
660 | 662 |
cli_errmsg("cli_add: mutex lock fail\n"); |