changeset 552:71ca2b40fdc9

7118283: Better input parameter checking in zip file processing Reviewed-by: sherman
author asaha
date Tue, 13 Dec 2011 17:40:39 -0800
parents ee0f12b18cb8
children bfaa99d5bef8
files src/share/native/java/util/zip/zip_util.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/java/util/zip/zip_util.c	Wed Nov 30 22:10:30 2011 +0000
+++ b/src/share/native/java/util/zip/zip_util.c	Tue Dec 13 17:40:39 2011 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -450,7 +450,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;
 }