summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2015-11-13 13:49:43 -0800
committerJohn Chen <jochen@microsoft.com>2015-11-13 13:49:43 -0800
commit0f6dd7966ea98820b10d2dce87a90769eaf644f9 (patch)
tree2ce8a6378b2bdeb59737c9c2a14021c9b9c1f7ba /src
parentd9baf060f209f20c302700b2aee778b48e32b9dc (diff)
downloadcoreclr-0f6dd7966ea98820b10d2dce87a90769eaf644f9.tar.gz
coreclr-0f6dd7966ea98820b10d2dce87a90769eaf644f9.tar.bz2
coreclr-0f6dd7966ea98820b10d2dce87a90769eaf644f9.zip
Remove an unsafe memory write in HeapFree
The PAL implementation of HeapFree assumes that the memory region always have at least 4 bytes. Depending on the heap implementation, this is not necessarily true, and can potentially cause memory corruption.
Diffstat (limited to 'src')
-rw-r--r--src/pal/src/memory/heap.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/pal/src/memory/heap.cpp b/src/pal/src/memory/heap.cpp
index ff1f2a2133..732fe9aee8 100644
--- a/src/pal/src/memory/heap.cpp
+++ b/src/pal/src/memory/heap.cpp
@@ -309,8 +309,6 @@ HeapFree(
goto done;
}
- *((DWORD *) lpMem) = 0;
-
bRetVal = TRUE;
#ifdef __APPLE__
// This is patterned off of InternalFree in malloc.cpp.