From: Anatol Belski Date: Tue, 28 Oct 2014 18:29:07 +0000 (+0100) Subject: fix datatype mismatch warn X-Git-Tag: PRE_PHP7_REMOVALS~87^2~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=842a98ef3213107c2e3746e54623c271f99114d9;p=php fix datatype mismatch warn --- 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;