From b8b4455f8fb53971c4001083404968f983e6df47 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 6 Mar 2014 17:00:52 +0000 Subject: [PATCH] * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete password from memory. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/setlsapwd.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7da440bf7..136dafb1f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-03-06 Corinna Vinschen + + * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete password + from memory. + 2014-03-05 Corinna Vinschen * ldap.cc (rediscover_thread): Remove. diff --git a/winsup/cygwin/setlsapwd.cc b/winsup/cygwin/setlsapwd.cc index c103d0d07..14eb12eeb 100644 --- a/winsup/cygwin/setlsapwd.cc +++ b/winsup/cygwin/setlsapwd.cc @@ -93,7 +93,7 @@ setlsapwd (const char *passwd, const char *username) } if (data_buf) { - memset (data.Buffer, 0, data.Length); + RtlSecureZeroMemory (data.Buffer, data.Length); free (data_buf); } }