Skip to content

Commit

Permalink
Avoid signed shift in minizip zip.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Mar 12, 2024
1 parent f60ce91 commit 99b2294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/minizip/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ local int block_get(block_t *block) {
// if the end is reached.
local long block_get2(block_t *block) {
long got = block_get(block);
return got | ((long)block_get(block) << 8);
return got | ((unsigned long)block_get(block) << 8);
}

// Read up to len bytes from block into buf. Return the number of bytes read.
Expand Down

0 comments on commit 99b2294

Please sign in to comment.