mirror of
https://github.com/php/php-src.git
synced 2024-12-24 09:18:17 +08:00
- #52523, fix logic (0 is perfectly valid as part of the data, bin data)
This commit is contained in:
parent
1e26362d4b
commit
cf7d0fb4e7
@ -70,13 +70,9 @@ PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) { /* {{{
|
||||
ret = CryptGenRandom(hCryptProv, size, buf);
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
if (ret) {
|
||||
while (i < size && buf[i] != 0) {
|
||||
i++;
|
||||
}
|
||||
if (i == size) {
|
||||
return SUCCESS;
|
||||
}
|
||||
return SUCCESS;
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user