From e84000fcbafc4800b58e1fa9ddbb2d99bed0b5b7 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 1 Dec 2015 01:39:24 +0000 Subject: [PATCH] missing.h: explicit_bzero by SecureZeroMemory * include/ruby/missing.h (explicit_bzero): use SecureZeroMemory on Windows. assume Windows XP or later at compile time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/missing.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ruby/missing.h b/include/ruby/missing.h index a06cea2ba4..cec0d1ca76 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -252,6 +252,8 @@ explicit_bzero_by_memset_s(void *b, size_t len) memset_s(b, len, 0, len); } # define explicit_bzero(b, len) explicit_bzero_by_memset_s(b, len) +# elif defined _WIN32 +# define explicit_bzero(b, len) SecureZeroMemory(b, len) # endif #endif