From 851bd057ecfa2997252429f86362b0a710a1af8d Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 26 Jan 2018 10:35:13 +0000 Subject: call _exit instead of abort in release mode Avoids cores being created, as they're nowadays often piped to some call home system --- contrib/epee/src/memwipe.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'contrib/epee/src') 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 #include +#include #ifdef HAVE_EXPLICIT_BZERO #include #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; -- cgit v1.2.3