unicorn-net icon indicating copy to clipboard operation
unicorn-net copied to clipboard

Bad page size check

Open sbarisic opened this issue 5 years ago • 0 comments

https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L101 https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L103 https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L128 https://github.com/FICTURE7/unicorn-net/blob/master/src/Unicorn.Net/Memory.cs#L130

Page alignment checks are wrong, they should be:

if ((address & ((ulong)PageSize - 1)) != 0)

Same for size.

sbarisic avatar Aug 22 '18 13:08 sbarisic