From: Daniel Stenberg Date: Wed, 28 Nov 2001 23:19:17 +0000 (+0000) Subject: fill memory with junk on malloc() X-Git-Tag: curl-7_9_2~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfdcf5c93325b55cd223484b65b73b20a296a6e9;p=curl fill memory with junk on malloc() --- diff --git a/lib/memdebug.c b/lib/memdebug.c index 82ebf00d9..0d0c43eb6 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -70,6 +70,9 @@ void curl_memdebug(const char *logname) void *curl_domalloc(size_t size, int line, const char *source) { void *mem=(malloc)(size); + if(mem) + /* fill memory with junk */ + memset(mem, 0xA5, size); if(logfile) fprintf(logfile, "MEM %s:%d malloc(%d) = %p\n", source, line, size, mem);