From 6d5656d36f91819cc007fa40d06bebd7f499557e Mon Sep 17 00:00:00 2001 From: Dhruv Paranjape Date: Tue, 15 Aug 2023 15:23:22 +0200 Subject: [PATCH] replace memset_s with explicit_bzero if memset_s is not available use explict_bzero instead. --- src/client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client.c b/src/client.c index ca11d39a..90f193fd 100644 --- a/src/client.c +++ b/src/client.c @@ -402,7 +402,11 @@ int trilogy_auth_switch_send(trilogy_conn_t *conn, const trilogy_handshake_t *ha void trilogy_auth_clear_password(trilogy_conn_t *conn) { if (conn->socket->opts.password) { + # ifdef __STDC_WANT_LIB_EXT1__ memset_s(conn->socket->opts.password, conn->socket->opts.password_len, 0, conn->socket->opts.password_len); + #else + explicit_bzero(conn->socket->opts.password, conn->socket->opts.password_len); + #endif } }