]> granicus.if.org Git - curl/commitdiff
fill memory with junk on malloc()
authorDaniel Stenberg <daniel@haxx.se>
Wed, 28 Nov 2001 23:19:17 +0000 (23:19 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 28 Nov 2001 23:19:17 +0000 (23:19 +0000)
lib/memdebug.c

index 82ebf00d97e46039f9f26acd585c8ff226a0105c..0d0c43eb6075a160e7c2b177acaff22c2eb04339 100644 (file)
@@ -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);