summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:39:24 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:39:24 (GMT)
commite84000fcbafc4800b58e1fa9ddbb2d99bed0b5b7 (patch)
tree6691ce3992b9ba5512e4909f8db69b958bc7028e
parenta73f0f2caead604ad0a1d1de657d7bdcb00cf242 (diff)
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
-rw-r--r--include/ruby/missing.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index a06cea2..cec0d1c 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