diff options
author | June McEnroe <june@causal.agency> | 2019-10-31 19:04:43 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-10-31 19:04:43 -0400 |
commit | c4404762701c7073e1f85d7f89834b5ddd59e749 (patch) | |
tree | bbe1d574587f2e6d5841d2c49fb7eb4018839eef /bounce.h | |
parent | Send clients their own QUIT on shutdown (diff) | |
download | pounce-c4404762701c7073e1f85d7f89834b5ddd59e749.tar.gz pounce-c4404762701c7073e1f85d7f89834b5ddd59e749.zip |
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.
Diffstat (limited to 'bounce.h')
-rw-r--r-- | bounce.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. */ +#ifdef __APPLE__ +#define __STDC_WANT_LIB_EXT1__ 1 +#define explicit_bzero(b, len) memset_s((b), (len), 0, (len)) +#endif + #include <stdbool.h> #include <stdio.h> #include <stdlib.h> |