Browse code

update

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@769 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/08/20 05:09:33
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Aug 19 22:06:35 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav/matcher-bm.c: stop and report error if signature is shorter than
4
+			    BM_MIN_LENGTH (main.cvd:25 is now required)
5
+
1 6
 Wed Aug 18 22:38:39 BST 2004 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/mbox.c:	Multithread the followURL code - URLs are now followed					in parallel
... ...
@@ -21,7 +21,7 @@
21 21
 #include <ctype.h>
22 22
 #include <stdlib.h>
23 23
 
24
-#define MINLENGTH 10 /* only optimize signatures longer than MINLENGT */
24
+#define MINLENGTH 40 /* only optimize signatures longer than MINLENGT */
25 25
 #define FILEBUFF 16384
26 26
 #define ANALYZE 6 /* only analyze first ANALYZE characters */
27 27
 
... ...
@@ -36,9 +36,8 @@ int cli_bm_addpatt(struct cl_node *root, struct cli_bm_patt *pattern)
36 36
 
37 37
 
38 38
     if(pattern->length < BM_MIN_LENGTH) {
39
-	cli_dbgmsg("Ignoring signature for %s (too short)\n", pattern->virname);
40
-	/* return CL_EPATSHORT; */
41
-	return 0;
39
+	cli_errmsg("Signature for %s is too short\n", pattern->virname);
40
+	return CL_EPATSHORT;
42 41
     }
43 42
 
44 43
     for(i = BM_MIN_LENGTH - BM_BLOCK_SIZE; i >= 0; i--) {