MCPcopy Create free account
hub / github.com/HexHive/NASS / ParseCustomString

Function ParseCustomString

fuzz/libfuzzer/FuzzerIOWindows.cpp:301–307  ·  view source on GitHub ↗

Parse the given Ref string from the position Offset, to exactly match the given string Patt. Returns number of characters considered if successful.

Source from the content-addressed store, hash-verified

299// Parse the given Ref string from the position Offset, to exactly match the
300// given string Patt. Returns number of characters considered if successful.
301static size_t ParseCustomString(const std::string &Ref, size_t Offset,
302 const char *Patt) {
303 size_t Len = strlen(Patt);
304 if (Offset + Len > Ref.size())
305 return 0;
306 return Ref.compare(Offset, Len, Patt) == 0 ? Len : 0;
307}
308
309// Parse a location, like:
310// \\?\UNC\Server\Share\ \\?\C:\ \\Server\Share\ \ C:\ C:

Callers 1

ParseLocationFunction · 0.85

Calls 2

sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected