mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
File scan now uses bytesMatch() instead of signatureMatches(), reducing call stack size
This commit is contained in:
parent
a56f92cdee
commit
cd0c86e0d6
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ export function scanForFileTypes(buf) {
|
||||||
sigs.forEach(sig => {
|
sigs.forEach(sig => {
|
||||||
let pos = 0;
|
let pos = 0;
|
||||||
while ((pos = locatePotentialSig(buf, sig, pos)) >= 0) {
|
while ((pos = locatePotentialSig(buf, sig, pos)) >= 0) {
|
||||||
if (signatureMatches(sig, buf, pos)) {
|
if (bytesMatch(sig, buf, pos)) {
|
||||||
foundFiles.push({
|
foundFiles.push({
|
||||||
offset: pos,
|
offset: pos,
|
||||||
fileDetails: filetype
|
fileDetails: filetype
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue