[clamav-users] About scanning files larger than 2 GB in size
Paul Kosinski
clamav-users at iment.com
Sun Jan 22 04:02:43 UTC 2023
On Sun, 22 Jan 2023 05:40:18 +0900
Tsutomu Oyamada <oyamada at promark-inc.com> wrote:
> How do I set up clamd?
> Setting MaxFileSize to "0" is unlimited, but internally files larger than 2GB in size cannot be scanned.
> In this case, do you treat the file as clean without scanning it at all?
I've complained about the 2 GiB limit now and then for several years. It's a holdover from when 32-bit numbers were all that CPUs supported, and lots of code used C's signed "int" for file size and offset.
Way back in 1996, FAT32 had this limit, but even it was extended to 4 GiB (via unsigned 32-bit numbers) when Large File Support was added.
These days, media files are often bigger than 2 GiB, as are some archive files (esp. disk images). Furthermore, almost all recent versions of standard OSes are 64-bit, and very few 32-bit CPUs are even being sold. In other words, the 2 GiB limit is quite an anachronism.
More information about the clamav-users
mailing list