Tomasz Kojm
ab0d2f054d
libclamav, clamd, clamscan: use cl_engine_set() to control AC settings
...
git-svn: trunk@4404
17 years ago
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
17 years ago
Török Edvin
fc0493d2ca
reduce memory usage of AC nodes
...
git-svn: trunk@4363
17 years ago
Török Edvin
6a21552ef2
have configure define NDEBUG unless we use --enable-debug, instead of having
...
to #ifndef CL_DEBUG #define NDEBUG #endif in each .c file that uses assert.
If you want assertions enabled you'll need to use --enable-debug to configure,
as until now, no change there.
git-svn: trunk@4343
17 years ago
aCaB
38e881e3c0
mpool cli_mp_hex2ui
...
git-svn: trunk@4337
17 years ago
Tomasz Kojm
a305a2616a
libclamav/matcher-ac.c: micro-optimization (bb#843), thanks to Edwin
...
git-svn: trunk@4334
17 years ago
aCaB
d6e1ef1611
mempool deuglification
...
git-svn: trunk@4333
17 years ago
Török Edvin
ad0fd7287a
* libclamav/matcher-ac.c (cli_ac_addsig): need to use mpool allocated memory for ->str
...
* libclamav/mpool.c (mp_malloc, cli_mp_hex2str, check_all): introduce hex2str wrapper
* libclamav/mpool.h (mp_t, cli_mp_hex2str): introduce hex2str wrapper
* libclamav/regex_list.c (add_hash): need to use mpool allocated memory for arg to bm_addpatt
git-svn: trunk@4330
17 years ago
Török Edvin
563582a1ec
fix unit tests when mpool is activated
...
git-svn: trunk@4323
17 years ago
aCaB
e21657dfc9
a faster and more compact allocator
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4286 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
0d9dbdef21
some leaks fixed
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4280 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
29f241666f
fix hexnew allocation, mempool for regex_list
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4276 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
a5746c2512
TODO:
...
- make regex* and hash* behave properly (either include or exclude from the pool entirely)
- cleanup the ifdefs and make a single macro
- fixup the proto for dconf (re-enables make check in mpool-mode)
- check the possibility to entirely wipe frees from error paths in mpool-mode
(this totally simplifies the code)
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4271 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
885c2bf5b9
builds with and without mpools (#define USE_MPOOL) but it's still very broked
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4269 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
0728972ea5
(hoepfully) completed db load, regexes and hashes missing
...
need to recheck strlen(hex2string) bugs, need to figure how to hangle regexes and hashes: edwiiiiiiin!!! :D
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4268 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
b583d6ed27
small update
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4267 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
b94e66c486
HIGLY EXPERIMENTAL memory pool for libclamav
...
The goal is to put an end to memory wasted due to stupid allocators and fragmentation
In the long run mpool libraries will be replaced with better code. For now there just good enough.
This branch is currently under development and totally broken.
If it will ever compile, it'll probably result in random crashes or at least (slightly) higher load times.
The code is also terrible, just don't look.
Do not use except for testing.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4266 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Tomasz Kojm
3b934d1e49
libclamav/matcher-ac.c: improve detection and reordering of zero-only subpatterns (bb#1188)
...
git-svn: trunk@4207
17 years ago
Tomasz Kojm
341faf6051
libclamav: drop obsolete code in matcher-ac
...
git-svn: trunk@4140
17 years ago
Tomasz Kojm
a45c7039c1
shut up some gcc warnings
...
git-svn: trunk@4092
17 years ago
Tomasz Kojm
710a22f179
libclamav/matcher-ac.c: add support for returning multiple matches in cli_ac_scanbuff()
...
git-svn: trunk@4017
17 years ago
Tomasz Kojm
ee8bd2fb14
libclamav: lsigs: handle extended block modifiers (bb#896)
...
git-svn: trunk@3998
17 years ago
Tomasz Kojm
c7aeeb46ef
evaluate lsigs in cli_scandesc
...
git-svn: trunk@3997
17 years ago
Török Edvin
10290ba3eb
allow custom data to be associated with patterns (such as a regex) via a void*
...
field.
Fix memory leaks, and valgrind problems in regex_list_done.
git-svn: trunk@3994
17 years ago
Tomasz Kojm
677fc4ba3b
libclamav: add initial support for logical signatures (bb#896)
...
git-svn: trunk@3993
17 years ago
Tomasz Kojm
b5513f8ddf
libclamav: add ".UNOFFICIAL" suffix to 3rd party signatures (bb#1061)
...
git-svn: trunk@3903
17 years ago
Tomasz Kojm
746bc18177
fix handling of nodes which also match single bytes (bb#1054)
...
git-svn: trunk@3890
17 years ago
Tomasz Kojm
72ce4b70eb
improve handling of PDF, CAB, RTF, OLE2 and HTML files (sync with branch/0.93)
...
git-svn: trunk@3862
17 years ago
Tomasz Kojm
5d763f04a5
scan for embedded PEs inside OLE2 files (bb#914)
...
git-svn: trunk@3763
17 years ago
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
17 years ago
Tomasz Kojm
5025967e6d
use limits->maxfiles instead of MAX_EMBEDDED_OBJ for ZIP-SFX
...
git-svn: trunk@3668
17 years ago
Tomasz Kojm
6038397ea6
filetype detection improvements
...
git-svn: trunk@3662
18 years ago
Tomasz Kojm
6506412549
fix handling of root->ac_pattable (bb#837)
...
git-svn: trunk@3636
18 years ago
aCaB
2455584143
sync to trunk
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/newlimits@3599 77e5149b-7576-45b1-b177-96237e5ba77b
18 years ago
Tomasz Kojm
1a2906f432
add support for matching single bytes anchored to sub-signatures; bump f-level
...
git-svn: trunk@3588
18 years ago
Tomasz Kojm
a2f9787784
fix handling of bfs_last (bb#713)
...
git-svn: trunk@3381
18 years ago
Tomasz Kojm
3d53538b51
add cli_ac_setdepth(), --dev-ac-depth, DevACOnly, DevACDepth
...
git-svn: trunk@3365
18 years ago
Tomasz Kojm
20c2455d14
minor tidy
...
git-svn: trunk@3268
18 years ago
Tomasz Kojm
4286022819
fix range calculation for multipart sigs with string alternatives
...
git-svn: trunk@3266
18 years ago
Tomasz Kojm
1a648b3717
add basic support for string alternatives; optimise bfs_enqueue/dequeue
...
git-svn: trunk@3262
18 years ago
Tomasz Kojm
ecf5865b53
minor optimisation
...
git-svn: trunk@3251
18 years ago
Tomasz Kojm
9187ef9027
properly handle alternatives in the new approach
...
git-svn: trunk@3227
18 years ago
Tomasz Kojm
c01ff22d4b
minor optimisation
...
git-svn: trunk@3220
18 years ago
Tomasz Kojm
e38ab7c147
various speed optimisations
...
git-svn: trunk@3218
18 years ago
Tomasz Kojm
3832cd7c84
fix matching of patterns with prefixes and some other issues
...
git-svn: trunk@3164
18 years ago
Tomasz Kojm
cdfcca0cae
fix segfault on OOM (bb#515)
...
git-svn: trunk@3067
18 years ago
Tomasz Kojm
84fd5a614c
fix some possible error path leaks by changing cli_realloc() to cli_realloc2()
...
git-svn: trunk@3064
18 years ago
Tomasz Kojm
2242da430e
fix boundary error (bb#491)
...
git-svn: trunk@3049
18 years ago
Tomasz Kojm
fbcef1b0b5
new implementation of the Aho-Corasick pattern matcher
...
git-svn: trunk@3038
18 years ago
Tomasz Kojm
bb34cb31fe
update some copyrights and stick to GPL v2
...
git-svn: trunk@3003
18 years ago