Mailing List Archive

[openbsd 3.4 - clam 0.66] (u) random
Hi,

After analyzing the problem with gdb, I found that the problems comes from
"unsigned int cl_rndnum(unsigned int max)" function and #ifndef C_URANDOM
decides if the cl_rndnum is made with rand() function or with /dev/urandom
device.
With /dev/urandom --> long time for scanning eicar
With rand() --> no problems

??? any idees ?
Re: [openbsd 3.4 - clam 0.66] (u) random [ In reply to ]
On Thu, 12 Feb 2004 15:36:15 +0100
"LOYET Jerome" <jerome@loyet.net> wrote:

> Hi,
>
> After analyzing the problem with gdb, I found that the problems comes
> from"unsigned int cl_rndnum(unsigned int max)" function and #ifndef
> C_URANDOM decides if the cl_rndnum is made with rand() function or
> with /dev/urandom device.
> With /dev/urandom --> long time for scanning eicar
> With rand() --> no problems

/dev/urandom shouldn't block - there must be some strange implementation
in OpenBSD.

Best regards,
Tomasz Kojm
--
oo ..... tkojm@clamav.net www.ClamAV.net
(\/)\......... http://www.clamav.net/gpg/tkojm.gpg
\..........._ 0DCA5A08407D5288279DB43454822DC8985A444B
//\ /\ Thu Feb 12 16:09:03 CET 2004
Re: [openbsd 3.4 - clam 0.66] (u) random [ In reply to ]
On Thu, 12 Feb 2004 15:36:15 +0100
"LOYET Jerome" <jerome@loyet.net> wrote:

> Hi,
>
> After analyzing the problem with gdb, I found that the problems comes
> from"unsigned int cl_rndnum(unsigned int max)" function and #ifndef
> C_URANDOM decides if the cl_rndnum is made with rand() function or
> with /dev/urandom device.
> With /dev/urandom --> long time for scanning eicar
> With rand() --> no problems
>
> ??? any idees ?

Answered on clamav-devel.

Best regards,
Tomasz Kojm
--
oo ..... tkojm@clamav.net www.ClamAV.net
(\/)\......... http://www.clamav.net/gpg/tkojm.gpg
\..........._ 0DCA5A08407D5288279DB43454822DC8985A444B
//\ /\ Thu Feb 12 16:14:45 CET 2004