Fix undefined behavior in random_genXX helpers #5

Merged
merged 1 commit into from Jan 23, 2017

Projects

None yet

2 participants

@cvtsi2sd
Contributor

random_gen16 and random_gen32 always passed an uint8_t to random_gen,
while specifying 2/4 bytes of length; this led to potential stack
damage and/or to reduced entropy in the result (only the last byte of
randomness was kept)

@cvtsi2sd cvtsi2sd Fix undefined behavior in random_genXX helpers
random_gen16 and random_gen32 always passed an uint8_t to random_gen,
while specifying 2/4 bytes of length; this led to potential stack
damage and/or to reduced entropy in the result (only the last byte of
randomness was kept)
5e53f91
@asterix24 asterix24 merged commit 1f5efa0 into develersrl:master Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment