Skip to content

Commit

Permalink
Add a length check when extra field parsed
Browse files Browse the repository at this point in the history
Signed-off-by: code-sunbo <[email protected]>
  • Loading branch information
code-sunbo committed Jul 11, 2024
1 parent ba46576 commit f2830d0
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 f2830d0

Please sign in to comment.