Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>:

> 2008/5/29 Mattias Gärtner <[EMAIL PROTECTED]>:
> >
> > Sounds like the Debian openssl key fiasko.
>
> I saw Ubuntu had some updates to resolve this issue on my system. Got
> the updates, rebooted, recompiled my application and still 1021 is my
> limit before I get duplicates.

Sorry. Openssl has *nothing* to do with the CreateGUID function.
But the CreateGUID calls the kernel function and if this does not work it calls
Randomize and calls 16 times random(256).
But Randomize only work from time to time, so don't call it often - Bug in
GetRandomBytes.
IMO GetRandomBytes needs to check if Randomize has been called. Or even better:
Randomize should not reset the sequence if no random number is available.


> What is really weird is that once I hit the 1021 limit, I can't run
> that method again. I get a duplicate after 1 add!  It seems to behave
> exactly like random() without calling randomize().  It seems to
> remember the last "position" it it's seed or something and tries to
> continue where it left off. The same pattern, over and over.

Maybe the 1021 is the limit of /dev/random.

Mattias

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to