From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/compress-commons/lib/archivers/zip/util.js | 4 ++-- node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js | 4 ++-- .../compress-commons/lib/archivers/zip/zip-archive-output-stream.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'node_modules/compress-commons/lib') diff --git a/node_modules/compress-commons/lib/archivers/zip/util.js b/node_modules/compress-commons/lib/archivers/zip/util.js index 147702c34..d3ca45e14 100644 --- a/node_modules/compress-commons/lib/archivers/zip/util.js +++ b/node_modules/compress-commons/lib/archivers/zip/util.js @@ -49,7 +49,7 @@ util.getEightBytes = function(v) { util.getShortBytes = function(v) { var buf = new Buffer(2); - buf.writeUInt16LE(v, 0); + buf.writeUInt16LE((v & 0xFFFF) >>> 0, 0); return buf; }; @@ -60,7 +60,7 @@ util.getShortBytesValue = function(buf, offset) { util.getLongBytes = function(v) { var buf = new Buffer(4); - buf.writeUInt32LE(v, 0); + buf.writeUInt32LE((v & 0xFFFFFFFF) >>> 0, 0); return buf; }; diff --git a/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js b/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js index e5b0d69a7..92b4eee23 100644 --- a/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +++ b/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js @@ -26,8 +26,8 @@ var ZipArchiveEntry = module.exports = function(name) { this.method = -1; this.name = null; - this.size = -1; - this.csize = -1; + this.size = 0; + this.csize = 0; this.gpb = new GeneralPurposeBit(); this.crc = 0; this.time = -1; diff --git a/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js b/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js index d74c1e770..7c3934e81 100644 --- a/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +++ b/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js @@ -224,7 +224,7 @@ ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() { this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD)); // size of the ZIP64 EOCD record - this.write(zipUtil.getEightBytes(56)); + this.write(zipUtil.getEightBytes(44)); // version made by this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64)); @@ -437,4 +437,4 @@ ZipArchiveOutputStream.prototype.isZip64 = function() { ZipArchiveOutputStream.prototype.setComment = function(comment) { this._archive.comment = comment; -}; \ No newline at end of file +}; -- cgit v1.2.3