Skip to content

Use unbuffered stdio for /dev/urandom to read exactly as much data as requested.#391

Merged
bradh352 merged 1 commit intoc-ares:masterfrom
vburdo:fix-randomize_key
Dec 15, 2020
Merged

Use unbuffered stdio for /dev/urandom to read exactly as much data as requested.#391
bradh352 merged 1 commit intoc-ares:masterfrom
vburdo:fix-randomize_key

Conversation

@vburdo
Copy link
Contributor

@vburdo vburdo commented Dec 15, 2020

Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.

@bradh352 bradh352 merged commit 44fbc81 into c-ares:master Dec 15, 2020
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022
…ares#391)

Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.

Fix By: @vburdo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants