From c2ea73542f029c7a467067e68e8627eb8a588eed Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 9 Aug 2010 08:14:14 +0000 Subject: [PATCH] - #52523, fix logic (0 is perfectly valid as part of the data, bin data) --- win32/winutil.c | 7 +------ 1 file changed, 1 insertion(+), 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; } -- 2.40.0