diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/compress-commons/lib/archivers | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/compress-commons/lib/archivers')
3 files changed, 6 insertions, 6 deletions
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 +};
|