diff --git a/src/share/native/java/util/zip/zip_util.c b/src/share/native/java/util/zip/zip_util.c index f048dc6b75854aa7b2ef8f5755c48cdd0a823cac..4328c4c353472a6136e7e2c15cb4f273e52a3c36 100644 --- a/src/share/native/java/util/zip/zip_util.c +++ b/src/share/native/java/util/zip/zip_util.c @@ -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; }