Binary: skips short string entirely to improve performance

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
李通洲andCopilot committed 2026-04-27 19:51:14 +08:00
1 parent 8b611899d1
commit 0db820a6c1
3 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -112,8 +112,9 @@ const char* ffBinaryExtractStrings(const char* elfFile, bool (*cb)(const char* s
if (*p == '\0') {
continue;
}
uint32_t len = (uint32_t) strlen(p);
uint32_t len = (uint32_t) strnlen(p, data->d_size - off);
if (len < minLength) {
off += len;
continue;
}
// Only process printable ASCII characters