`random_with_seed_size` is producing an empty seed
maciejhirsz opened this issue · comments
seed
in:
Lines 46 to 55 in c86ed6a
is a 0-lenght Vec
, rng.fill(seed.as_mut_slice());
is a noop (you get a mutable 0-size slice).
Proper approach is to use a zero-ed vector (vec![0; len]
) or after creating a Vec
with capacity to use the unsafe set_len
(although you have to make sure the bytes aren't being read, as it opens you up to potential memory exploits if they are).
Good catch! Thanks for pointing it out.