Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool is_address_valid(ADDRINT addr) {
- static int pagesize = getpagesize();
- const void *foo = (const void *)(addr / pagesize * pagesize);
- if (munlock(foo, 1) == -1) {
- fprintf(stderr, "munlock(%p=>%p, 1) failed: %sn", addr, foo,
- strerror(errno));
- return false;
- }
- return true;
- }
Add Comment
Please, Sign In to add comment