From c4404762701c7073e1f85d7f89834b5ddd59e749 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 31 Oct 2019 19:04:43 -0400 Subject: Use explicit_bzero to clear passwords GNU doesn't implement memset_s, but both FreeBSD and GNU implement explicit_bzero. Darwin doesn't, so #define it in terms of memset_s. --- bounce.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bounce.h') diff --git a/bounce.h b/bounce.h index 5e6313b..5a03af2 100644 --- a/bounce.h +++ b/bounce.h @@ -14,6 +14,11 @@ * along with this program. If not, see . */ +#ifdef __APPLE__ +#define __STDC_WANT_LIB_EXT1__ 1 +#define explicit_bzero(b, len) memset_s((b), (len), 0, (len)) +#endif + #include #include #include -- cgit 1.4.1