Fix potential buffer overrun in ClearWithReferences
authorLevi Broderick <levib@microsoft.com>
Tue, 6 Mar 2018 17:11:52 +0000 (09:11 -0800)
committerLevi Broderick <GrabYourPitchforks@users.noreply.github.com>
Tue, 6 Mar 2018 18:46:04 +0000 (10:46 -0800)
src/mscorlib/shared/System/SpanHelpers.cs

index 6752d7f..c3cfe5a 100644 (file)
@@ -517,7 +517,6 @@ namespace System
             // Write first four and last three.
             Unsafe.Add(ref ip, 2) = default(IntPtr);
             Unsafe.Add(ref ip, 3) = default(IntPtr);
-            Unsafe.Add(ref ip, 4) = default(IntPtr);
             Unsafe.Add(ref Unsafe.Add(ref ip, (IntPtr)pointerSizeLength), -3) = default(IntPtr);
             Unsafe.Add(ref Unsafe.Add(ref ip, (IntPtr)pointerSizeLength), -2) = default(IntPtr);