summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/Instance.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2009-11-02 12:33:53 -0330
committerMatthew Newhook <matthew@zeroc.com>2009-11-02 12:33:53 -0330
commit49d2c48ad03a97444c16d8f6e2d646b4478daaf0 (patch)
tree0e777eb037f765f81a6bc633b78d40263b276c57 /cpp/src/IceSSL/Instance.cpp
parentMinor #ifdef fix for 4341. (diff)
downloadice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.tar.bz2
ice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.tar.xz
ice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.zip
- icegridadmin when using username/password authentication now zeros
the entire password after use. - Fixed memset of password in the IceSSL impl.
Diffstat (limited to 'cpp/src/IceSSL/Instance.cpp')
-rw-r--r--cpp/src/IceSSL/Instance.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp
index 66f148da791..1f0897a0a9d 100644
--- a/cpp/src/IceSSL/Instance.cpp
+++ b/cpp/src/IceSSL/Instance.cpp
@@ -123,7 +123,10 @@ IceSSL_opensslPasswordCallback(char* buf, int size, int flag, void* userData)
strncpy(buf, passwd.c_str(), sz);
buf[sz] = '\0';
- memset(&passwd[0], 0, static_cast<size_t>(passwd.size()));
+ for(string::iterator p = passwd.begin(); p != passwd.end(); ++p)
+ {
+ *p = '\0';
+ }
return sz;
}