Skip to content

Commit

Permalink
8330615: avoid signed integer overflows in zip_util.c readCen / hashN
Browse files Browse the repository at this point in the history
Backport-of: 5af6b45eefd227e3e046ca22a404ae8a23174160
  • Loading branch information
MBaesken committed Jun 18, 2024
1 parent 5fc41c8 commit 8751ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java.base/share/native/libzip/zip_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ hash(const char *s)
static unsigned int
hashN(const char *s, int length)
{
int h = 0;
unsigned int h = 0;
while (length-- > 0)
h = 31*h + *s++;
return h;
Expand Down

1 comment on commit 8751ace

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.