Skip to content

Commit

Permalink
Merge pull request #520 from code-sunbo/master
Browse files Browse the repository at this point in the history
Add a length check when extra field parsed
  • Loading branch information
5saviahv committed Jul 11, 2024
2 parents ba46576 + f2830d0 commit ef63cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ module.exports = function (/** object */ options, /*Buffer*/ input) {
try {
var offset = 0;
var signature, size, part;
while (offset < data.length) {
while (offset + 4 < data.length) {
signature = data.readUInt16LE(offset);
offset += 2;
size = data.readUInt16LE(offset);
Expand Down

0 comments on commit ef63cbb

Please sign in to comment.