| 8 | #include "PointerCheck.h" |
| 9 | |
| 10 | bool PointerCheck::check(void *addr) { |
| 11 | int nullfd = open("/dev/random", O_WRONLY); |
| 12 | bool valid = true; |
| 13 | if (write(nullfd, (void *) addr, sizeof(addr)) < 0) { |
| 14 | valid = false; |
| 15 | } |
| 16 | close(nullfd); |
| 17 | return valid; |
| 18 | } |
no outgoing calls
no test coverage detected