Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Fix potential buffer overrun in ClearWithReferences
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabYourPitchforks committed Mar 6, 2018
1 parent 40eea04 commit ca69645
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Common/src/CoreLib/System/SpanHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ public static unsafe void ClearWithReferences(ref IntPtr ip, nuint pointerSizeLe
// 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);

Expand Down

0 comments on commit ca69645

Please sign in to comment.