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
+2 -1
View File
@@ -49,8 +49,9 @@ const char* ffBinaryExtractStrings(const char* peFile, bool (*cb)(const char* st
if (*p == '\0') {
continue;
}
uint32_t len = (uint32_t) strlen(p);
uint32_t len = (uint32_t) strnlen(p, section->SizeOfRawData - off);
if (len < minLength) {
off += len;
continue;
}
// Only process printable ASCII characters