Merge pull request #512 from arnout/patch-1 s_mp_rand_platform.c: s_read_urandom: correctly handle split read
diff --git a/s_mp_rand_platform.c b/s_mp_rand_platform.c
index 06b2f1b..0a6982a 100644
--- a/s_mp_rand_platform.c
+++ b/s_mp_rand_platform.c
@@ -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;