changeset 5614:9b34aca7cd0c

6954621: small error in 6948909 Reviewed-by: xuelei
author weijun
date Mon, 24 May 2010 09:28:25 +0800
parents 1146efa21514
children 3d77087a5a6c
files jdk/src/share/classes/sun/security/tools/JarSigner.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/sun/security/tools/JarSigner.java	Mon May 24 09:28:06 2010 +0800
+++ b/jdk/src/share/classes/sun/security/tools/JarSigner.java	Mon May 24 09:28:25 2010 +0800
@@ -1486,7 +1486,7 @@
         for (int i=0; i<len; i++) {
             switch (bs[i]) {
                 case '\r':
-                    if (i < len && bs[i+1] == '\n') i++;
+                    if (i < len - 1 && bs[i+1] == '\n') i++;
                     // fallthrough
                 case '\n':
                     if (newline) return i+1;    //+1 to get length