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

aCaB acab at clamav.net
Sun Apr 4 01:06:57 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 09cb13a343469056e30db0126778b267833e9a7a
Author: aCaB <acab at clamav.net>
Date:   Sat Oct 3 15:58:16 2009 +0200

    fix fmap_qsel

diff --git a/libclamav/fmap.c b/libclamav/fmap.c
index c5fd677..760821e 100644
--- a/libclamav/fmap.c
+++ b/libclamav/fmap.c
@@ -141,9 +141,13 @@ fmap_t *fmap(int fd, off_t offset, size_t len) {
 }
 
 
-static void fmap_qsel(fmap_t *m, unsigned int *freeme, unsigned int left, unsigned int right) {
-    unsigned int i = left, j = right;
-    unsigned int pivot = m->bitmap[freeme[(left + right) / 2]] & FM_MASK_COUNT;
+static void fmap_qsel(fmap_t *m, unsigned int *freeme, int left, int right) {
+    int i = left, j = right;
+    int pivot;
+
+    if (i > j) return;
+
+    pivot = m->bitmap[freeme[(left + right) / 2]] & FM_MASK_COUNT;
 
     while(i <= j) {
 	while((m->bitmap[freeme[i]] & FM_MASK_COUNT) > pivot)

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list