From ec0bcecee7b3b54e3b870ab254f5a4ee79feed3d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 26 Jan 2018 21:32:09 +0100 Subject: [PATCH] Add RtlSecureZeroMemory to explicit_bzero() compile case just in case one would use the function directly. The use of ZEND_SECURE_ZERO could be eliminated now, too. Or it can be kept for BC. --- main/explicit_bzero.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/explicit_bzero.c b/main/explicit_bzero.c index 22d768d18b..652c628796 100644 --- a/main/explicit_bzero.c +++ b/main/explicit_bzero.c @@ -34,6 +34,8 @@ PHPAPI void php_explicit_bzero(void *dst, size_t siz) { #if HAVE_EXPLICIT_MEMSET explicit_memset(dst, 0, siz); +#elif defined(PHP_WIN32) + RtlSecureZeroMemory(dst, siz); #elif defined(__GNUC__) memset(dst, 0, siz); asm __volatile__("" :: "r"(dst) : "memory"); -- 2.50.1