mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8330615: avoid signed integer overflows in zip_util.c readCen / hashN
Reviewed-by: lucy, mdoerr
This commit is contained in:
parent
4dfaa9b5bd
commit
5af6b45eef
1 changed files with 1 additions and 1 deletions
|
@ -437,7 +437,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue