7118283: Better input parameter checking in zip file processing
Fixed off-by-one bug in zip_util.c Reviewed-by: alanb
This commit is contained in:
parent
53ea54c90f
commit
8514873d3d
@ -521,7 +521,7 @@ countCENHeaders(unsigned char *beg, unsigned char *end)
|
||||
{
|
||||
jint count = 0;
|
||||
ptrdiff_t i;
|
||||
for (i = 0; i + CENHDR < end - beg; i += CENSIZE(beg + i))
|
||||
for (i = 0; i + CENHDR <= end - beg; i += CENSIZE(beg + i))
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user