]> granicus.if.org Git - php/commitdiff
fix datatype mismatch warn
authorAnatol Belski <ab@php.net>
Tue, 28 Oct 2014 18:29:07 +0000 (19:29 +0100)
committerAnatol Belski <ab@php.net>
Wed, 29 Oct 2014 14:30:02 +0000 (15:30 +0100)
win32/winutil.c

index 5203fb4e66ffb3b16548e2ab456e348dff1fbb94..eab3df9cdaf560544005ded6c99fffb279acd659 100644 (file)
@@ -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;