From 119dee607b8c2cfacb2ba2a72c0f36235fc417b7 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 2 Jan 2018 13:59:49 -0800 Subject: [PATCH] Remove use of Dangerous Span calls for MemoryMarshal (#501) --- .../Server/IISHttpContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs index 6b33a6d342..5f1c6ac894 100644 --- a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs +++ b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs @@ -583,7 +583,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration { var pDataChunks = stackalloc HttpApiTypes.HTTP_DATA_CHUNK[1]; - fixed (byte* pBuffer = &buffer.First.Span.DangerousGetPinnableReference()) + fixed (byte* pBuffer = &MemoryMarshal.GetReference(buffer.First.Span)) { ref var chunk = ref pDataChunks[0];