Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
/ jdk22u Public archive

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 May 14, 2024
1 parent dd5581c commit 5550682
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 5550682

@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.