MCPcopy Create free account
hub / github.com/GJDuck/e9patch / setTarget

Function setTarget

src/e9patch/e9CFR.cpp:28–36  ·  view source on GitHub ↗

* Setter/getter. */

Source from the content-addressed store, hash-verified

26 * Setter/getter.
27 */
28static bool setTarget(uint8_t *targets, size_t size, intptr_t offset)
29{
30 if (offset < (intptr_t)sizeof(Elf64_Ehdr) || (size_t)offset >= size)
31 return false;
32 size_t i = (size_t)offset / 8;
33 size_t j = (size_t)offset % 8;
34 targets[i] |= (1 << j);
35 return true;
36}
37static bool isTarget(const uint8_t *targets, size_t size, intptr_t offset)
38{
39 if (offset < (intptr_t)sizeof(Elf64_Ehdr) || (size_t)offset >= size)

Callers 1

targetAnalysisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected