Commit 1e1f89907 for clamav.net
commit 1e1f89907df7f4b2ff1fb19ff00577aaff9f9e18
Author: John Humlick <15677335+jhumlick@users.noreply.github.com>
Date: Tue Oct 20 13:31:31 2026 -0700
Mark truncated XAR scans as non-cacheable
Disable caching when XAR gzip extraction hits MaxFileSize or
MaxScanSize, since the member will not be fully scanned.
diff --git a/libclamav/xar.c b/libclamav/xar.c
index 06488369c..280748672 100644
--- a/libclamav/xar.c
+++ b/libclamav/xar.c
@@ -751,6 +751,9 @@ int cli_scanxar(cli_ctx *ctx)
writelen = bytes;
limitret = cli_checklimits("cli_scanxar", ctx, out_size + bytes, 0, 0);
if (limitret == CL_EMAXSIZE) {
+ /* This member will be truncated and not fully scanned. */
+ emax_reached(ctx);
+
uint64_t allowed = writelen;
if (ctx->engine->maxfilesize) {