Commit graph

27 commits

Author SHA1 Message Date
Valerie Snyder
51adfb8b61
ClamScan & libclamav: improve precision of bytes-scanned, bytes-read
The ClamScan scan summary prints bytes scanned and bytes read in
multiples of 4096 (aka `CL_COUNT_PRECISION`), as is provided by the
`cl_scanfile()`, `cl_scandesc()`, `cl_scanfile_callback()`, and
`cl_scandesc_callback()` functions.

I believe this imprecision was the result of using an `unsigned long int`
which may be 64bit or 32bit, depending on platform. I believe the
intention was to be able to support scanning more than 4 GiB of data.

Since the new `cl_scan*_ex()` functions use a `uint64_t`, which
guarantees a 64bit integer and supports ~16,777,216 terabytes, I find no
reason not to report an accurate count.

For the legacy scan functions (above) I've kept the `CL_COUNT_PRECISION`
behavior to maintain backwards compatibility.

I have also improved the bytes scanned/read output to report GiB, MiB,
KiB, or B as appropriate. Previously, it always report "MB".

CLAM-1433
2025-08-14 22:39:15 -04:00
Val Snyder
7ff29b8c37
Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Micah Snyder
9cb28e51e6 Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Micah Snyder
6eebecc303 Bump copyright for 2023 2023-02-12 11:20:22 -08:00
Micah Snyder
fcd8902cb2 HWP3, ASN1, blob: Remove all-match checks 2022-10-19 13:13:57 -07:00
mko-x
a21cc6dcd7
Add explicit log level parameter to application logging API
* Added loglevel parameter to logg()

* Fix logg and mprintf internals with new loglevels

* Update all logg calls to set loglevel

* Update all mprintf calls to set loglevel

* Fix hidden logg calls

* Executed clam-format
2022-02-15 15:13:55 -08:00
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
72fd33c8b2 clang-format'd using new .clang-format rules. 2019-10-02 16:08:16 -04:00
Mickey Sola
46a35abe56 mass update of copyright headers 2015-09-17 13:41:26 -04:00
aCaB
094104a7ac preliminary dlopen support for libclamunrar - this is mostly libtool stuff
git-svn-id: file:///var/lib/svn/clamav-devel/branches/dlopen@4360 77e5149b-7576-45b1-b177-96237e5ba77b
2008-11-09 18:23:04 +00:00
Török Edvin
2bbbd2380f reorder some struct fields to avoid holes
git-svn: trunk@4355
2008-11-08 16:26:30 +00:00
Török Edvin
4270f93bcc (bb #913, #916)
* fix scan of partial messages
* allow for tempfiles to be cleaned up based on age
* new clamd.conf option ScanPartialMessages
* sample cleanup script
* clamd/thrmgr.c: fix item_count


git-svn: trunk@4031
2008-07-30 13:54:34 +00:00
Tomasz Kojm
2023340a41 update copyrights and stick more files to GPLv2; move and add more credits to the AUTHORS file; add COPYING.BSD
git-svn: trunk@3749
2008-04-02 15:24:51 +00:00
aCaB
46ecb38d3a blob fixes
git-svn: trunk@3729
2008-03-20 21:02:17 +00:00
aCaB
b5231f5f67 realign structs see bb#474
git-svn: trunk@3537
2008-01-24 13:24:02 +00:00
Nigel Horne
7891ef0bc0 Add comment
git-svn: trunk@3426
2007-12-16 15:17:07 +00:00
Nigel Horne
9fe789f8b8 Many changes since 0.92
git-svn: trunk@3407
2007-12-13 16:18:18 +00:00
Nigel Horne
a585329e7f mbox optimisation to reduce the lifetime of temporary files
git-svn: trunk@3193
2007-08-29 18:21:39 +00:00
Nigel Horne
ea49b0fccd Bug 637
git-svn: trunk@3191
2007-08-27 23:05:16 +00:00
Nigel Horne
18682e484c blobGetFilename is now static()
git-svn: trunk@3035
2007-04-21 22:59:28 +00:00
Tomasz Kojm
11b50569a6 revert patch from bb#245
git-svn: trunk@3006
2007-04-02 17:49:01 +00:00
Nigel Horne
7f0c7fe5e9 NAME_MAX is now in others.h
git-svn: trunk@2891
2007-03-01 20:45:41 +00:00
Nigel Horne
8797c78486 cli_sanitise_filename
git-svn: trunk@2840
2007-02-22 17:30:00 +00:00
Sven Strickroth
a99111f050 remove old CVS-stuff and make the repository look more like SVN
git-svn: trunk@2755
2007-02-17 19:02:20 +00:00
Renamed from clamav-devel/libclamav/blob.h (Browse further)