| 281 | }); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | |
| 286 | #endif |
| 287 | |
| 288 | bool KittyPtrValidator::isPtrReadable(uintptr_t ptr, size_t len) |
| 289 | { |
| 290 | if (ptr == 0 || ptr + len < ptr) |
| 291 | return false; |
| 292 | |
| 293 | ptr = KittyUtils::untagPointer(ptr); |
| 294 | |
| 295 | uintptr_t end = ptr + len; |
| 296 | RegionInfo region(0, 0, false, false, false); |
| 297 | while (region.end < end) |
| 298 | { |
| 299 | if (!_findRegion(ptr, ®ion) || !region.readable) |
| 300 | return false; |
| 301 | |
| 302 | ptr = region.end; |
| 303 | } |
| 304 |
nothing calls this directly
no test coverage detected