From: Andreas Schwab Date: Wed, 25 Sep 2024 09:49:30 +0000 (+0200) Subject: Fix missing randomness in __gen_tempname (bug 32214) X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=5f62cf88c4530c11904482775b7582bd7f6d80d2;p=glibc.git Fix missing randomness in __gen_tempname (bug 32214) Make sure to update the random value also if getrandom fails. Fixes: 686d542025 ("posix: Sync tempname with gnulib") --- diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c index c00fe0c181..fc30958a0c 100644 --- a/sysdeps/posix/tempname.c +++ b/sysdeps/posix/tempname.c @@ -117,6 +117,8 @@ random_bits (random_value *r, random_value s) succeed. */ #if !_LIBC *r = mix_random_values (v, clock ()); +#else + *r = v; #endif return false; }