Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit 04efa15

Browse files
GrabYourPitchforksjkotas
authored andcommitted
Fix potential buffer overrun in ClearWithReferences
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
1 parent 1911656 commit 04efa15

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/System.Private.CoreLib/shared/System/SpanHelpers.cs

-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ public static unsafe void ClearWithReferences(ref IntPtr ip, nuint pointerSizeLe
517517
// Write first four and last three.
518518
Unsafe.Add(ref ip, 2) = default(IntPtr);
519519
Unsafe.Add(ref ip, 3) = default(IntPtr);
520-
Unsafe.Add(ref ip, 4) = default(IntPtr);
521520
Unsafe.Add(ref Unsafe.Add(ref ip, (IntPtr)pointerSizeLength), -3) = default(IntPtr);
522521
Unsafe.Add(ref Unsafe.Add(ref ip, (IntPtr)pointerSizeLength), -2) = default(IntPtr);
523522

0 commit comments

Comments
 (0)