New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined behavior in random_genXX helpers #5

Merged
merged 1 commit into from Jan 23, 2017

Conversation

Projects
None yet
2 participants
@cvtsi2sd
Contributor

cvtsi2sd commented Jan 23, 2017

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)

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)

@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