Skip to content

Commit 6d80623

Browse files
committed
Fixed condition.
1 parent fd4871f commit 6d80623

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Memory/NativeHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public bool ReadRemoteMemory(IntPtr process, IntPtr address, byte[] buffer, int
315315
{
316316
Contract.Requires(buffer != null);
317317

318-
if (offset + length >= buffer.Length)
318+
if (offset + length > buffer.Length)
319319
{
320320
throw new ArgumentOutOfRangeException("offset + length");
321321
}

Memory/RemoteProcess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public bool ReadRemoteMemoryIntoBuffer(IntPtr address, ref byte[] buffer, int of
6868
Contract.Requires(buffer != null);
6969
Contract.Requires(offset >= 0);
7070
Contract.Requires(length >= 0);
71-
Contract.Requires(offset + length < buffer.Length);
71+
Contract.Requires(offset + length <= buffer.Length);
7272

7373
if (!IsValid)
7474
{

0 commit comments

Comments
 (0)