[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:15 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 53e8cd6f12e7c1e0bf152dcfa38d73154905189b
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Mon Oct 26 16:10:04 2009 +0100
libclamav/others.c: call srand() already in cli_init() (bb#1728)
diff --git a/ChangeLog b/ChangeLog
index a523bab..8ff958d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Oct 26 16:09:29 CET 2009 (tk)
+---------------------------------
+ * libclamav/others.c: call srand() already in cli_init() (bb#1728)
+
Mon Oct 26 13:08:41 CET 2009 (tk)
---------------------------------
* clamdscan/proto.c: handle recv() == 0 (bb#1717)
diff --git a/libclamav/others.c b/libclamav/others.c
index 0ef86af..ed53020 100644
--- a/libclamav/others.c
+++ b/libclamav/others.c
@@ -255,10 +255,15 @@ const char *cl_strerror(int clerror)
int cl_init(unsigned int initoptions)
{
+ struct timeval tv;
+ unsigned int pid = (unsigned int) getpid();
+
/* put dlopen() stuff here, etc. */
if (lt_init() == 0) {
cli_rarload();
}
+ gettimeofday(&tv, (struct timezone *) 0);
+ srand(pid + tv.tv_usec*++pid + clock());
return CL_SUCCESS;
}
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list