[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:08:24 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 6e089598f004829891dc42bf015d56156f5b2df2
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Mon Oct 26 18:34:36 2009 +0100

    use random() in the second srand()

diff --git a/libclamav/others_common.c b/libclamav/others_common.c
index 12eb309..1fd7890 100644
--- a/libclamav/others_common.c
+++ b/libclamav/others_common.c
@@ -755,7 +755,7 @@ unsigned int cli_rndnum(unsigned int max)
     if(name_salt[0] == 16) { /* minimizes re-seeding after the first call to cli_gentemp() */
 	    struct timeval tv;
 	gettimeofday(&tv, (struct timezone *) 0);
-	srand(tv.tv_usec+clock());
+	srand(tv.tv_usec+clock()+random());
     }
 
     return 1 + (unsigned int) (max * (rand() / (1.0 + RAND_MAX)));

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list