Binary: skips short string entirely to improve performance

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
李通洲
2026-04-27 19:51:04 +08:00
parent 8b611899d1
commit 0db820a6c1
3 changed files with 5 additions and 4 deletions
+1 -2
View File
@@ -72,6 +72,7 @@ static bool handleMachSection(const FFMemoryMapping* mapping, const char* name,
}
uint32_t len = (uint32_t) strnlen(p, size - off);
if (len < minLength) {
off += len; // Skip short strings
continue;
}
if (*p >= ' ' && *p <= '~') { // Ignore control characters
@@ -177,8 +178,6 @@ static const char* dumpMachHeader(const FFMemoryMapping* mapping, off_t offset,
}
}
}
return NULL;
}
return NULL;