From cd0c86e0d66ea8df0771282b0333b90607037188 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Thu, 3 Jan 2019 13:03:41 +0000 Subject: [PATCH] File scan now uses bytesMatch() instead of signatureMatches(), reducing call stack size --- src/core/lib/FileType.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/FileType.mjs b/src/core/lib/FileType.mjs index 93c7634..202b54d 100644 --- a/src/core/lib/FileType.mjs +++ b/src/core/lib/FileType.mjs @@ -133,7 +133,7 @@ export function scanForFileTypes(buf) { sigs.forEach(sig => { let pos = 0; while ((pos = locatePotentialSig(buf, sig, pos)) >= 0) { - if (signatureMatches(sig, buf, pos)) { + if (bytesMatch(sig, buf, pos)) { foundFiles.push({ offset: pos, fileDetails: filetype