Skip to content

Commit

Permalink
Merge pull request #512 from arnout/patch-1
Browse files Browse the repository at this point in the history
s_mp_rand_platform.c: s_read_urandom: correctly handle split read
  • Loading branch information
sjaeckel authored Sep 21, 2021
2 parents eda0bd6 + 528fdb0 commit 8355b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s_mp_rand_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static mp_err s_read_urandom(void *p, size_t n)
if (fd == -1) return MP_ERR;

while (n > 0u) {
ssize_t ret = read(fd, p, n);
ssize_t ret = read(fd, q, n);
if (ret < 0) {
if (errno == EINTR) {
continue;
Expand Down

0 comments on commit 8355b88

Please sign in to comment.