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

Function parseName

src/e9tool/e9frontend.cpp:769–778  ·  view source on GitHub ↗

* Parse a name. */

Source from the content-addressed store, hash-verified

767 * Parse a name.
768 */
769static const char *parseName(const char *strtab, size_t strlen, size_t idx)
770{
771 if (idx >= strlen)
772 return nullptr;
773 const char *name = strtab + idx;
774 size_t max = strlen - idx;
775 if (name[0] == '\0' || strnlen(name, max) == max)
776 return nullptr;
777 return name;
778}
779
780/*
781 * Parse the Global Offset Table (GOT).

Callers 3

parseGOTFunction · 0.85
parsePLTFunction · 0.85
parseSymbolsFunction · 0.85

Calls 1

strnlenFunction · 0.85

Tested by

no test coverage detected