8000 extractAllTo is broken with 0.5.15 · Issue #533 · cthackers/adm-zip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

extractAllTo is broken with 0.5.15 #533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chandanjainn opened this issue Aug 14, 2024 · 2 comments
Open

extractAllTo is broken with 0.5.15 #533

chandanjainn opened this issue Aug 14, 2024 · 2 comments

Comments

@chandanjainn
Copy link

Got the following error with v0.5.15. It was working until 0.5.14

Error: ADM-ZIP: Descriptor data is malformed at Object.DESCRIPTOR_FAULTY (/usr/src/app/node_modules/adm-zip/util/errors.js:56:16) at crc32OK (/usr/src/app/node_modules/adm-zip/zipEntry.js:62:36) at decompress (/usr/src/app/node_modules/adm-zip/zipEntry.js:121:26) at Object.getData (/usr/src/app/node_modules/adm-zip/zipEntry.js:320:24) at /usr/src/app/node_modules/adm-zip/adm-zip.js:762:37 at Array.forEach (<anonymous>) at Object.extractAllTo (/usr/src/app/node_modules/adm-zip/adm-zip.js:756:26) at download_and_unzip (/usr/src/app/processes/utils/batch.utils.js:64:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async module.exports.getProcessedFile (/usr/src/app/processes/utils/batch.utils.js:79:37)

The following data integrity check seems to be failing
image

@devland
Copy link
devland commented Aug 20, 2024

The weird thing is that this happens only on some systems.
For me it does not happen but for a colleague of mine it does and we're both running the same amd-zip powered code with the same adm-zip version.
So there may also be a race condition or some other aspect involved that makes the same zip file fail the check on one system while it always passes on another.

@devland
Copy link
devland commented Feb 20, 2025

We managed to reproduce this again on v0.5.16 and on master branch as of writing this (1cd32f7).

To reproduce locally run extractAllTo on the below attached zip file.
descriptorMalformed.zip

The error is generated by this line:

throw Utils.Errors.DESCRIPTOR_FAULTY();

when descriptor.size does not match _centralHeader.size.
For our example the values are 0 and 57 respectively.

As a workaround you can simply comment out the error on line 62 in zipEntry.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0