Please ingore clamav-0.60.patch from prev email. Correct patch attached. -- Eugene Miretskiy <[EMAIL PROTECTED]> INVISION.COM, INC. (631) 543-1000 www.invision.net / www.longisland.com
Only in clamav-0.60.new: autom4te.cache
diff -ru -x aclocal.m4 -x Makefile.in -x configure clamav-0.60/configure.in
clamav-0.60.new/configure.in
--- clamav-0.60/configure.in 2003-06-20 23:05:32.000000000 -0400
+++ clamav-0.60.new/configure.in 2003-08-20 17:11:49.000000000 -0400
@@ -176,6 +176,13 @@
AC_SUBST(CFGDIR)
AC_DEFINE_UNQUOTED(CONFDIR,"$cfg_dir",)
+dnl search tree depth
+AC_ARG_WITH(depth,
+[ --with-depth=number number of levels in pattern search tree (default=2).],
+tree_depth=$withval, tree_depth=2)
+
+AC_DEFINE_UNQUOTED(CL_MIN_LENGTH,$tree_depth,)
+
dnl Do not overwrite the current config file
AM_CONDITIONAL(INSTALL_CONF, test ! -r "$cfg_dir/clamav.conf")
Only in clamav-0.60.new: configure.in.orig
Only in clamav-0.60.new: configure.in.patch
diff -ru -x aclocal.m4 -x Makefile.in -x configure clamav-0.60/libclamav/clamav.h
clamav-0.60.new/libclamav/clamav.h
--- clamav-0.60/libclamav/clamav.h 2000-03-15 20:05:00.000000000 -0500
+++ clamav-0.60.new/libclamav/clamav.h 2003-08-20 16:48:27.000000000 -0400
@@ -30,7 +30,10 @@
#define CL_NUM_CHILDS 256
-#define CL_MIN_LENGTH 2
+
+#ifndef CL_MIN_LENGTH
+ #define CL_MIN_LENGTH 2
+#endif
#define CL_COUNT_PRECISION 4096
diff -ru -x aclocal.m4 -x Makefile.in -x configure clamav-0.60/libclamav/matcher.c
clamav-0.60.new/libclamav/matcher.c
--- clamav-0.60/libclamav/matcher.c 2000-01-09 17:15:00.000000000 -0500
+++ clamav-0.60.new/libclamav/matcher.c 2003-08-20 18:17:07.000000000 -0400
@@ -37,13 +37,9 @@
struct cl_node *pos, *next;
int i;
- if(pattern->length < CL_MIN_LENGTH) {
- return CL_EPATSHORT;
- }
-
pos = root;
- for(i = 0; i < CL_MIN_LENGTH; i++) {
+ for(i = 0; i < CL_MIN_LENGTH && i < pattern->length; i++) {
next = pos->trans[((unsigned char) pattern->pattern[i]) & 0xff];
if(!next) {
@@ -177,7 +173,7 @@
{
struct cl_node *current;
struct patt *pt;
- int i, position, *partcnt;
+ int i, position, virfound, *partcnt;
current = (struct cl_node *) root;
@@ -188,10 +184,11 @@
if(current->islast) {
position = i - CL_MIN_LENGTH + 1;
-
pt = current->list;
+ virfound = (pt->length < CL_MIN_LENGTH);
+
while(pt) {
- if(cli_findpos(buffer, position, length, pt)) {
+ if(virfound || cli_findpos(buffer, position, length, pt)) {
if(pt->sigid) { /* it's a partial signature */
if(partcnt[pt->sigid] + 1 == pt->partno) {
if(++partcnt[pt->sigid] == pt->parts) { /* last */
pgp00000.pgp
Description: PGP signature
