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

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 01:21:58 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 26f558a6ce7bdfc17ac56655be44111671fc80b2
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Fri Mar 5 21:14:55 2010 +0100

    libclamav/matcher-bm.c: properly handle scan boundaries in offset mode (bb#1840)

diff --git a/ChangeLog b/ChangeLog
index 2d970da..019f656 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar  5 21:14:12 CET 2010 (tk)
+---------------------------------
+ * libclamav/matcher-bm.c: properly handle scan boundaries in
+			   offset mode (bb#1840)
+
 Fri Mar  5 19:11:25 CET 2010 (tk)
 ---------------------------------
  * libclamav: fix cl_cvdparse() leak (bb#1859)
diff --git a/libclamav/matcher-bm.c b/libclamav/matcher-bm.c
index 6c445df..4faa449 100644
--- a/libclamav/matcher-bm.c
+++ b/libclamav/matcher-bm.c
@@ -269,7 +269,10 @@ int cli_bm_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
     memset(&info, 0, sizeof(info));
     i = BM_MIN_LENGTH - BM_BLOCK_SIZE;
     if(offdata) {
-	if(offdata->pos == offdata->cnt)
+	for(; offdata->pos && offdata->offtab[offdata->pos] > offset; offdata->pos--);
+	if(offdata->offtab[offdata->pos] < offset)
+	    offdata->pos++;
+	if(offdata->pos >= offdata->cnt)
 	    return CL_CLEAN;
 	i += offdata->offtab[offdata->pos] - offset;
     }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list