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
1e2969a4e1
reenable non-mpooll builds
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4282 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
d22176efd2
MERGE COMPLETE
...
TODO
- unuglify the ifdefs
- reenable make checks
- rework mpool.c
- test
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4281 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
b36e9f8a1a
mempool for regex_list/phishcheck
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4277 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
Török Edvin
ed65443330
fix whitespace
...
git-svn: trunk@4235
17 years ago
Török Edvin
3baee5029c
convert a checked fixture into an unchecked fixture,
...
it is sufficient if that setup code is run once, this speeds up the tests.
fix some helgrind warnings
(the phishcheck struct is going to be freed anyway, so writing
something to it doesn't help anyway)
git-svn: trunk@4180
17 years ago
Tomasz Kojm
341faf6051
libclamav: drop obsolete code in matcher-ac
...
git-svn: trunk@4140
17 years ago
Török Edvin
5cd3f734a9
add lots of warnings flags to 'make distcheck',
...
and turn some warnings into errors (bb #1092 )
git-svn: trunk@4129
17 years ago
Török Edvin
e6f14011ef
fix crash in SO_search when len == 1
...
also skip matching too short strings (they won't match anyway)
git-svn: trunk@4067
17 years ago
Török Edvin
063ddd53f8
optimization: use the filter to avoid cli_bm_scanbuff calls
...
bugfix: SO_search returns -1 when it doesn't find a match,
code was assuming it returns 0.
git-svn: trunk@4061
17 years ago
Török Edvin
1126559f77
flag for U: lines, format is one of:
...
U:MD5
U1:MD5
U2:MD5
add unit test for md5 url match
git-svn: trunk@4053
17 years ago
Török Edvin
063bfe5e00
rename hashes -> md5_hashes
...
git-svn: trunk@4052
17 years ago
Török Edvin
b611b5ff71
initial support for matching URLs against MD5 hashes
...
git-svn: trunk@4049
17 years ago
Török Edvin
a2d14e06b9
add more unit-tests
...
fix matching bugs in regex_list
git-svn: trunk@4020
17 years ago
Török Edvin
a497dce52d
fix compiler warnings
...
constify
git-svn: trunk@4019
17 years ago
Török Edvin
9ee053feab
handle multiple matches (bb #1110 )
...
update tests for regex, reenable test
git-svn: trunk@4018
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
Török Edvin
acee0f956d
fix segfault in regex_list_done due to uninitialised value.
...
make valgrind testing script parse valgrind's output better
git-svn: trunk@3995
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
Török Edvin
3dcc2d784e
more tests for regex
...
run unit-tests under valgrind if available.
git-svn: trunk@3990
17 years ago
Török Edvin
82167b0a77
remove remaining CL_DEBUG, and add missing file
...
git-svn: trunk@3989
17 years ago
Török Edvin
250f2bc11d
fix memory leak
...
git-svn: trunk@3986
17 years ago
Török Edvin
5ee56e4103
split up regex_list.
...
begin testing for regex_suffix
git-svn: trunk@3985
17 years ago
Török Edvin
9828566c2a
unbreak make check
...
git-svn: trunk@3979
17 years ago
Török Edvin
2e11bcdfd9
performance improvements for URL matching (bb #725 , bb #650 ):
...
* use a suffix AC-trie and a shift-or FSM to filter
* rewrite the URL regex in C
* use a perfect hash to lookup TLD and ccTLD, instead of a regex
* TODO: suffixes having a common prefix: loop over all of them
cli_ac_free: multiple virname pointing to same location
git-svn: trunk@3978
17 years ago
Tomasz Kojm
e8ae4fae02
faster loading of uncompressed .cld files
...
git-svn: trunk@3854
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
Török Edvin
d6df9ffb5a
use pthread_cond_* instead of usleep() in MULTISCAN (bb #758 )
...
enable entconv by default
others.c: fix compiler warning
regex_list.c: remove unused code, because a better solution is scheduled for 0.94 (bb #725 )
git-svn: trunk@3627
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
6b656d3608
compatibility with new matcher extension
...
git-svn: trunk@3590
18 years ago
Török Edvin
c305bb5792
fix -pedantic warning.
...
git-svn: trunk@3587
18 years ago
Török Edvin
75fe12511f
when domain matchers, preserve full subdomain(bb #721 )
...
git-svn: trunk@3560
18 years ago
Török Edvin
5a9a9989b8
avoid holes in data-structures due to alignment.
...
git-svn: trunk@3459
18 years ago
Tomasz Kojm
056d95dc5a
add (initial) support for direct loading of CVD files
...
git-svn: trunk@3435
18 years ago
Tomasz Kojm
e81da56bb5
avoid circular list construction, when different versions of same .wdb is loaded twice. (BB #718 )
...
git-svn: trunk@3383
18 years ago
Tomasz Kojm
3d53538b51
add cli_ac_setdepth(), --dev-ac-depth, DevACOnly, DevACDepth
...
git-svn: trunk@3365
18 years ago
Török Edvin
8ea27f5c18
fix some warnings
...
git-svn: trunk@3275
18 years ago
Török Edvin
7191e94bd9
avoid some false positives when there are spaces in URL.
...
git-svn: trunk@3263
18 years ago
Török Edvin
97ba1aed4b
more improvements to the algorithm.
...
git-svn: trunk@3257
18 years ago
Török Edvin
ecd2643ba9
fix off by one substring logic.
...
git-svn: trunk@3256
18 years ago