Skip to content
Snippets Groups Projects
Commit cfdcf5c9 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

fill memory with junk on malloc()

parent 820de919
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment