]> sourceware.org Git - glibc.git/commitdiff
Fix missing randomness in __gen_tempname (bug 32214)
authorAndreas Schwab <schwab@suse.de>
Wed, 25 Sep 2024 09:49:30 +0000 (11:49 +0200)
committerAndreas Schwab <schwab@suse.de>
Thu, 26 Sep 2024 09:45:44 +0000 (11:45 +0200)
Make sure to update the random value also if getrandom fails.

Fixes: 686d542025 ("posix: Sync tempname with gnulib")
sysdeps/posix/tempname.c

index c00fe0c18110fef74495e9cd3155a97775350d5a..fc30958a0cb24dc4d62b2d831ee7f8b7e07c1961 100644 (file)
@@ -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;
 }
This page took 0.038528 seconds and 5 git commands to generate.