MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / check

Method check

Bcore/src/main/cpp/utils/PointerCheck.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "PointerCheck.h"
9
10bool 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}

Callers 2

oFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected