From f692c593e7f09bfc10be581779a7de2f95b75a65 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Sun, 29 Apr 2018 12:01:34 +0100 Subject: [PATCH] Buffer.alloc should be .from --- core/archive_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/archive_util.js b/core/archive_util.js index 346e569e..e0d102d9 100644 --- a/core/archive_util.js +++ b/core/archive_util.js @@ -78,7 +78,7 @@ module.exports = class ArchiveUtil { Object.keys(Config.fileTypes).forEach(mimeType => { const fileType = Config.fileTypes[mimeType]; if(fileType.sig) { - fileType.sig = Buffer.alloc(fileType.sig, 'hex'); + fileType.sig = Buffer.from(fileType.sig, 'hex'); fileType.offset = fileType.offset || 0; // :TODO: this is broken: sig is NOT this long, it's sig.length long; offset needs to allow for -negative values as well