8330615: avoid signed integer overflows in zip_util.c readCen / hashN
Reviewed-by: lucy, mdoerr
This commit is contained in:
parent
4dfaa9b5bd
commit
5af6b45eef
@ -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…
Reference in New Issue
Block a user