summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-31 17:45:02 -0400
committerJune McEnroe <june@causal.agency>2019-10-31 17:45:02 -0400
commit750be17704654f93a16ef4fc36405ba3abb5f493 (patch)
treedd74df6cb3d2bd2cdc27245e800994cf720159c4 /state.c
parentClean up cert path documentation (diff)
downloadpounce-750be17704654f93a16ef4fc36405ba3abb5f493.tar.gz
pounce-750be17704654f93a16ef4fc36405ba3abb5f493.zip
Clear passwords from memory with memset_s
Diffstat (limited to 'state.c')
-rw-r--r--state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/state.c b/state.c
index 50afb26..37df845 100644
--- a/state.c
+++ b/state.c
@@ -14,6 +14,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#define __STDC_WANT_LIB_EXT1__ 1
+
 #include <assert.h>
 #include <err.h>
 #include <stdbool.h>
@@ -99,6 +101,7 @@ static void handleAuthenticate(struct Message *msg) {
 	(void)msg;
 	if (!plainBase64) errx(EX_PROTOCOL, "unsolicited AUTHENTICATE");
 	serverFormat("AUTHENTICATE %s\r\n", plainBase64);
+	memset_s(plainBase64, strlen(plainBase64), 0, strlen(plainBase64));
 	free(plainBase64);
 	plainBase64 = NULL;
 }