summaryrefslogtreecommitdiff
path: root/win32/winutil.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-08-09 08:14:14 +0000
committerPierre Joye <pajoye@php.net>2010-08-09 08:14:14 +0000
commitc2ea73542f029c7a467067e68e8627eb8a588eed (patch)
tree306b13ad153651b5785e46df151170cc22d5ee0c /win32/winutil.c
parentab8e74a0c83b7ddf99325e185e1aa697b855f25c (diff)
downloadphp-git-c2ea73542f029c7a467067e68e8627eb8a588eed.tar.gz
- #52523, fix logic (0 is perfectly valid as part of the data, bin data)
Diffstat (limited to 'win32/winutil.c')
-rw-r--r--win32/winutil.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index 3fc2955ff8..ce4f1ba57f 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -70,12 +70,7 @@ 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;
}
return FAILURE;
}