changeset 4585:a1a3620c1530

7118283: Better input parameter checking in zip file processing Summary: Fixed off-by-one bug in zip_util.c Reviewed-by: asaha
author sherman
date Mon, 05 Dec 2011 21:01:03 -0800
parents f32cfb330272
children 43bf4d62a772
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 Nov 30 13:39:17 2011 -0800
+++ b/src/share/native/java/util/zip/zip_util.c	Mon Dec 05 21:01:03 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;
 }