Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-06-03 18:24:11 +00:00
parent 2bb35eab2f
commit 200dd0cf5b
88 changed files with 1039 additions and 527 deletions

View file

@ -1,13 +1,16 @@
module.exports = function (/*Buffer*/ inbuf) {
const version = +(process.versions ? process.versions.node : "").split(".")[0] || 0;
module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) {
var zlib = require("zlib");
const option = version >= 15 ? { maxOutputLength: expectedLength } : {};
return {
inflate: function () {
return zlib.inflateRawSync(inbuf);
return zlib.inflateRawSync(inbuf, option);
},
inflateAsync: function (/*Function*/ callback) {
var tmp = zlib.createInflateRaw(),
var tmp = zlib.createInflateRaw(option),
parts = [],
total = 0;
tmp.on("data", function (data) {

View file

@ -120,7 +120,7 @@ function decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) {
// if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time
// 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry
const verifyByte = ((header.flags & 0x8) === 0x8) ? header.timeHighByte : header.crc >>> 24;
const verifyByte = (header.flags & 0x8) === 0x8 ? header.timeHighByte : header.crc >>> 24;
//3. does password meet expectations
if (salt[11] !== verifyByte) {