diff --git a/methods/inflater.js b/methods/inflater.js index 17c7ee1..8769e66 100644 --- a/methods/inflater.js +++ b/methods/inflater.js @@ -2,7 +2,7 @@ const version = +(process.versions ? process.versions.node : "").split(".")[0] | module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) { var zlib = require("zlib"); - const option = version >= 15 ? { maxOutputLength: expectedLength } : {}; + const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {}; return { inflate: function () { diff --git a/package.json b/package.json index 5d613ee..5ed72c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adm-zip", - "version": "0.5.13", + "version": "0.5.14", "description": "Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk", "scripts": { "test": "mocha -R spec",