From cfdcf5c93325b55cd223484b65b73b20a296a6e9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 28 Nov 2001 23:19:17 +0000 Subject: fill memory with junk on malloc() --- lib/memdebug.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/memdebug.c') 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); -- cgit v1.2.3