[PATCH 3/3] Merge tempname ASLR etc. patch from Gnulib
Florian Weimer
fweimer@redhat.com
Tue Aug 23 07:19:26 GMT 2022
* Paul Eggert:
> @@ -299,18 +325,16 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
> {
> if (vdigits == 0)
> {
> - do
> - {
> - v = random_bits (v, use_getrandom);
> - use_getrandom = true;
> - }
> - while (unfair_min <= v);
> + /* Worry about bias only if the bits are high quality. */
> + while (random_bits (&v, v) && biased_min <= v)
> + continue;
Should glibc simply use arc4random_uniform here?
Thanks,
Florian
More information about the Libc-alpha
mailing list