Val Snyder
7ff29b8c37
Bump copyright dates for 2025
2025-02-14 10:24:30 -05:00
Micah Snyder
8e04c25fec
Rename clamav memory allocation functions
...
We have some special functions to wrap malloc, calloc, and realloc to
make sure we don't allocate more than some limit, similar to the
max-filesize and max-scansize limits. Our wrappers are really only
needed when allocating memory for scans based on untrusted user input,
where a scan file could have bytes that claim you need to allocate
some ridiculous amount of memory. Right now they're named:
- cli_malloc
- cli_calloc
- cli_realloc
- cli_realloc2
... and these names do not convey their purpose
This commit renames them to:
- cli_max_malloc
- cli_max_calloc
- cli_max_realloc
- cli_max_realloc2
The realloc ones also have an additional feature in that they will not
free your pointer if you try to realloc to 0 bytes. Freeing the memory
is undefined by the C spec, and only done with some realloc
implementations, so this stabilizes on the behavior of not doing that,
which should prevent accidental double-free's.
So for the case where you may want to realloc and do not need to have a
maximum, this commit adds the following functions:
- cli_safer_realloc
- cli_safer_realloc2
These are used for the MPOOL_REALLOC and MPOOL_REALLOC2 macros when
MPOOL is disabled (e.g. because mmap-support is not found), so as to
match the behavior in the mpool_realloc/2 functions that do not make use
of the allocation-limit.
2024-03-15 13:18:47 -04:00
Micah Snyder
9cb28e51e6
Bump copyright dates for 2024
2024-01-22 11:27:17 -05:00
Micah Snyder
38386349c5
Fix many warnings
2023-04-13 00:11:34 -07:00
Micah Snyder
6eebecc303
Bump copyright for 2023
2023-02-12 11:20:22 -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
b3e82e5e61
Replacing libclamav/cltypes.h with clamav-types.h.in, which generates a header clamav-types.h that we install alongside clamav.h.
2019-10-02 16:08:17 -04:00
Micah Snyder
72fd33c8b2
clang-format'd using new .clang-format rules.
2019-10-02 16:08:16 -04:00
Josh Soref
7cd9337a70
Spelling Adjustments ( #30 )
...
* spelling: accessed
* spelling: alignment
* spelling: amalgamated
* spelling: answers
* spelling: another
* spelling: acquisition
* spelling: apitid
* spelling: ascii
* spelling: appending
* spelling: appropriate
* spelling: arbitrary
* spelling: architecture
* spelling: asynchronous
* spelling: attachments
* spelling: argument
* spelling: authenticode
* spelling: because
* spelling: boundary
* spelling: brackets
* spelling: bytecode
* spelling: calculation
* spelling: cannot
* spelling: changes
* spelling: check
* spelling: children
* spelling: codegen
* spelling: commands
* spelling: container
* spelling: concatenated
* spelling: conditions
* spelling: continuous
* spelling: conversions
* spelling: corresponding
* spelling: corrupted
* spelling: coverity
* spelling: crafting
* spelling: daemon
* spelling: definition
* spelling: delivered
* spelling: delivery
* spelling: delimit
* spelling: dependencies
* spelling: dependency
* spelling: detection
* spelling: determine
* spelling: disconnects
* spelling: distributed
* spelling: documentation
* spelling: downgraded
* spelling: downloading
* spelling: endianness
* spelling: entities
* spelling: especially
* spelling: empty
* spelling: expected
* spelling: explicitly
* spelling: existent
* spelling: finished
* spelling: flexibility
* spelling: flexible
* spelling: freshclam
* spelling: functions
* spelling: guarantee
* spelling: hardened
* spelling: headaches
* spelling: heighten
* spelling: improper
* spelling: increment
* spelling: indefinitely
* spelling: independent
* spelling: inaccessible
* spelling: infrastructure
Conflicts:
docs/html/node68.html
* spelling: initializing
* spelling: inited
* spelling: instream
* spelling: installed
* spelling: initialization
* spelling: initialize
* spelling: interface
* spelling: intrinsics
* spelling: interpreter
* spelling: introduced
* spelling: invalid
* spelling: latency
* spelling: lawyers
* spelling: libclamav
* spelling: likelihood
* spelling: loop
* spelling: maximum
* spelling: million
* spelling: milliseconds
* spelling: minimum
* spelling: minzhuan
* spelling: multipart
* spelling: misled
* spelling: modifiers
* spelling: notifying
* spelling: objects
* spelling: occurred
* spelling: occurs
* spelling: occurrences
* spelling: optimization
* spelling: original
* spelling: originated
* spelling: output
* spelling: overridden
* spelling: parenthesis
* spelling: partition
* spelling: performance
* spelling: permission
* spelling: phishing
* spelling: portions
* spelling: positives
* spelling: preceded
* spelling: properties
* spelling: protocol
* spelling: protos
* spelling: quarantine
* spelling: recursive
* spelling: referring
* spelling: reorder
* spelling: reset
* spelling: resources
* spelling: resume
* spelling: retrieval
* spelling: rewrite
* spelling: sanity
* spelling: scheduled
* spelling: search
* spelling: section
* spelling: separator
* spelling: separated
* spelling: specify
* spelling: special
* spelling: statement
* spelling: streams
* spelling: succession
* spelling: suggests
* spelling: superfluous
* spelling: suspicious
* spelling: synonym
* spelling: temporarily
* spelling: testfiles
* spelling: transverse
* spelling: turkish
* spelling: typos
* spelling: unable
* spelling: unexpected
* spelling: unexpectedly
* spelling: unfinished
* spelling: unfortunately
* spelling: uninitialized
* spelling: unlocking
* spelling: unnecessary
* spelling: unpack
* spelling: unrecognized
* spelling: unsupported
* spelling: usable
* spelling: wherever
* spelling: wishlist
* spelling: white
* spelling: infrastructure
* spelling: directories
* spelling: overridden
* spelling: permission
* spelling: yesterday
* spelling: initialization
* spelling: intrinsics
* space adjustment for spelling changes
* minor modifications by klin
2018-02-27 22:00:09 -05:00
Micah Snyder
7e64560ce5
eliminating warnings that cropped up in 32bit ubuntu (16.04)
2017-08-31 11:00:34 -04:00
Micah Snyder
f59443aaaf
formatting commit only.
2017-08-30 13:50:00 -04:00
Steven Morgan
db1752d3e5
bb11746 Fix compile warning in spin.c. Patch by Ruga.
2017-02-14 14:16:18 -05:00
Mickey Sola
46a35abe56
mass update of copyright headers
2015-09-17 13:41:26 -04:00
Shawn Webb
60d8d2c352
Move all the crypto API to clamav.h
2014-07-01 19:38:01 -04:00
Shawn Webb
b2e7c931d0
Use OpenSSL for hashing.
2014-02-08 00:31:12 -05:00
Shawn Webb
241e7eb147
bb6258 - Add warnings when allocations fail
2013-03-01 13:51:15 -05:00
Tomasz Kojm
724b2bf770
Move cl_engine from clamav.h to others.h; move cl_limits to cl_engine;
...
New API calls:
int cl_init(unsigned int options);
struct cl_engine *cl_engine_new(unsigned int options);
int cl_engine_compile(struct cl_engine *engine);
struct cl_engine *cl_engine_dup(struct cl_engine *engine);
int cl_engine_free(struct cl_engine *engine);
more to come..
WARNING: THE BRANCH IS CURRENTLY BROKEN AND SHOULD NOT BE USED
git-svn-id: file:///var/lib/svn/clamav-devel/branches/newapi@4370 77e5149b-7576-45b1-b177-96237e5ba77b
2008-11-10 17:39:58 +00:00
Tomasz Kojm
d076ad0251
check in 0.93 patches
...
git-svn: trunk@3788
2008-04-14 20:13:05 +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
86e209d667
more limits
...
git-svn: trunk@3616
2008-02-11 20:19:20 +00:00
aCaB
850db69e9e
update limits
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/newlimits@3594 77e5149b-7576-45b1-b177-96237e5ba77b
2008-02-08 01:57:50 +00:00
aCaB
f377e052cd
Merging the post0.92 stuff
...
Please don't commit anything till I'm finished
A full changelog will come up later
Thanks
git-svn: trunk@3410
2007-12-13 19:45:38 +00:00
aCaB
40cfa7b3ba
minor improvements for unspin
...
git-svn: trunk@3367
2007-11-12 01:05:41 +00:00
aCaB
adc98193b8
rename x86 macroes due to collisions on HPUX
...
git-svn: trunk@3141
2007-07-12 00:38:51 +00:00
aCaB
632be7ba51
update file headers
...
git-svn: trunk@3008
2007-04-05 19:44:44 +00:00
aCaB
9a25caf33d
checking/fixing packers...
...
TODO:
- complete section_hdr transition
- check consistency in elf parser, more packers and rebuildpe
- remove hardcoded header size
- fix check for 1st sect rva
- ...
- regression
git-svn-id: file:///var/lib/svn/clamav-devel/branches/temp_branch_pe_cleanup@2939 77e5149b-7576-45b1-b177-96237e5ba77b
2007-03-14 14:50:05 +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