From 0d48d2a10b66902983c876272cdc9fac94a7f284 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 21 Jan 2013 19:45:58 -0800 Subject: [PATCH] Of course (...) in CryptGenRandom() the size comes before the buffer. --- src/libsodium/randombytes/randombytes_sysrandom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/randombytes/randombytes_sysrandom.c b/src/libsodium/randombytes/randombytes_sysrandom.c index c9852b2e..dc7ab93c 100644 --- a/src/libsodium/randombytes/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/randombytes_sysrandom.c @@ -163,7 +163,7 @@ sysrandom_buf(void * const buf, const size_t size) abort(); } #else - if (! CryptGenRandom(stream.hcrypt_prov, buf, size)) { + if (! CryptGenRandom(stream.hcrypt_prov, size, buf)) { abort(); } #endif