diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-01-26 10:35:13 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-01 13:32:46 +0000 |
commit | 851bd057ecfa2997252429f86362b0a710a1af8d (patch) | |
tree | ee07556385050124c85bcc76fea1cb1b81da65c5 /contrib/epee/src/memwipe.c | |
parent | Merge pull request #3130 (diff) | |
download | monero-851bd057ecfa2997252429f86362b0a710a1af8d.tar.xz |
call _exit instead of abort in release mode
Avoids cores being created, as they're nowadays often piped
to some call home system
Diffstat (limited to 'contrib/epee/src/memwipe.c')
-rw-r--r-- | contrib/epee/src/memwipe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/epee/src/memwipe.c b/contrib/epee/src/memwipe.c index da7e9f346..423eb89fb 100644 --- a/contrib/epee/src/memwipe.c +++ b/contrib/epee/src/memwipe.c @@ -31,6 +31,7 @@ #define __STDC_WANT_LIB_EXT1__ 1 #include <string.h> #include <stdlib.h> +#include <unistd.h> #ifdef HAVE_EXPLICIT_BZERO #include <strings.h> #endif @@ -50,7 +51,12 @@ void *memwipe(void *ptr, size_t n) { if (memset_s(ptr, n, 0, n)) { +#ifdef NDEBUG + fprintf(stderr, "Error: memset_s failed\n"); + _exit(1); +#else abort(); +#endif } SCARECROW // might as well... return ptr; |