From 842a98ef3213107c2e3746e54623c271f99114d9 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 28 Oct 2014 19:29:07 +0100 Subject: [PATCH] fix datatype mismatch warn --- win32/winutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0