summaryrefslogtreecommitdiff
path: root/win32/winutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/winutil.c')
-rw-r--r--win32/winutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index 5203fb4e66..eab3df9cda 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -115,7 +115,8 @@ PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) { /* {{{
return FAILURE;
}
- ret = CryptGenRandom(hCryptProv, size, buf);
+ /* XXX should go in the loop if size exceeds UINT_MAX */
+ ret = CryptGenRandom(hCryptProv, (DWORD)size, buf);
if (ret) {
return SUCCESS;