[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm (none) zolw at Wind.
Sun Apr 4 00:59:56 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit f28db33f85f87d5d775659a7038408181b7d4849
Author: Tomasz Kojm <zolw at Wind.(none)>
Date:   Thu Aug 20 00:35:22 2009 +0200

    libclamav/matcher-bm.c: micro-optimization

diff --git a/ChangeLog b/ChangeLog
index 2fd9a93..71890ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Aug 20 00:34:39 CEST 2009 (tk)
+----------------------------------
+ * libclamav/matcher-bm.c: micro-optimization
+
 Tue Aug 18 23:52:20 CEST 2009 (tk)
 ----------------------------------
  * libclamav/cpio.c: wrap unistd.h, reported by Nigel Horne
diff --git a/libclamav/matcher-bm.c b/libclamav/matcher-bm.c
index dd82ad7..f31698a 100644
--- a/libclamav/matcher-bm.c
+++ b/libclamav/matcher-bm.c
@@ -178,6 +178,10 @@ int cli_bm_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
 	if(shift == 0) {
 	    prefix = buffer[i - BM_MIN_LENGTH + BM_BLOCK_SIZE];
 	    p = root->bm_suffix[idx];
+	    if(p && p->cnt == 1 && p->pattern0 != prefix) {
+		i++;
+		continue;
+	    }
 	    pchain = 0;
 	    while(p) {
 		if(p->pattern0 != prefix) {

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list