]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
mktemp: stir in enough entropy (Bug#6683)
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 8 Aug 2011 07:29:46 +0000 (00:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 8 Aug 2011 07:30:55 +0000 (00:30 -0700)
* gl/lib/tempname.c.diff (gen_tempname_len):
Use x_suffix_len bytes' worth of entropy, not 8 bytes.

gl/lib/tempname.c.diff

index fcacf53dbd7c7b446c8baf61d19b977de0e705b5..3e30c972c2a34c4123e3d054371fec0fcfb860b4 100644 (file)
@@ -100,7 +100,7 @@ index 2da5afe..562955a 100644
 -  }
 -#endif
 -  value += random_time_bits ^ __getpid ();
-+  rand_src = randint_all_new (NULL, 8);
++  rand_src = randint_all_new (NULL, x_suffix_len);
 +  if (! rand_src)
 +    return -1;