aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygserver/setpwd.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-12-15 17:39:21 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-12-15 17:39:21 +0000
commitd08afb78d18df23a46d19c92f0f7f22e6b96a72d (patch)
tree2e19da5e6a8f64b840aa98f822928b472d63dbb0 /winsup/cygserver/setpwd.cc
parent8d12bd32cd6d72a2a220b4e6580096f5d293a611 (diff)
downloadnewlib-d08afb78d18df23a46d19c92f0f7f22e6b96a72d.zip
newlib-d08afb78d18df23a46d19c92f0f7f22e6b96a72d.tar.gz
newlib-d08afb78d18df23a46d19c92f0f7f22e6b96a72d.tar.bz2
* setpwd.cc (client_request_setpwd::serve): Explicitely erase password
buffer content after usage.
Diffstat (limited to 'winsup/cygserver/setpwd.cc')
-rw-r--r--winsup/cygserver/setpwd.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygserver/setpwd.cc b/winsup/cygserver/setpwd.cc
index 39989f8..70d96cd 100644
--- a/winsup/cygserver/setpwd.cc
+++ b/winsup/cygserver/setpwd.cc
@@ -90,6 +90,8 @@ client_request_setpwd::serve (transport_layer_base *const conn,
RtlAppendUnicodeStringToString (&key, &sid);
RtlInitUnicodeString (&data, _parameters.in.passwd);
status = LsaStorePrivateData (lsa, &key, data.Length ? &data : NULL);
+ if (data.Length)
+ memset (data.Buffer, 0, data.Length);
if (NT_SUCCESS (status))
error_code (0);
else