changeset 5048:a7cb0afadbee

7118283: Better input parameter checking in zip file processing Summary: Fixed off-by-one bug in zip_util.c Reviewed-by: alanb
author sherman
date Thu, 15 Dec 2011 14:18:56 -0800
parents 5d7e49a3a2f9
children d544965b59fe
files src/share/native/java/util/zip/zip_util.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/java/util/zip/zip_util.c	Wed Dec 14 14:43:44 2011 +0400
+++ b/src/share/native/java/util/zip/zip_util.c	Thu Dec 15 14:18:56 2011 -0800
@@ -521,7 +521,7 @@
 {
     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;
 }