File scan now uses bytesMatch() instead of signatureMatches(), reducing call stack size

This commit is contained in:
n1474335 2019-01-03 13:03:41 +00:00
parent a56f92cdee
commit cd0c86e0d6
1 changed files with 1 additions and 1 deletions

View File

@ -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