From 2f15c8a0bd2e84ace51661c2d0b52c8438547fab Mon Sep 17 00:00:00 2001 From: Liryna Date: Fri, 29 Mar 2024 22:39:29 -0400 Subject: [PATCH] Library - Read - Only copy the actual read data to the destination buffer #352 --- DokanNet/DokanOperationProxy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DokanNet/DokanOperationProxy.cs b/DokanNet/DokanOperationProxy.cs index 2558662e..4929e992 100644 --- a/DokanNet/DokanOperationProxy.cs +++ b/DokanNet/DokanOperationProxy.cs @@ -408,7 +408,7 @@ public NtStatus ReadFileProxy( try { result = operations.ReadFile(rawFileName, buffer, out rawReadLength, rawOffset, rawFileInfo); - Marshal.Copy(buffer, 0, rawBuffer, (int)rawBufferLength); + Marshal.Copy(buffer, 0, rawBuffer, rawReadLength); } finally {