6954621: small error in 6948909
authorweijun
Mon, 24 May 2010 09:28:25 +0800
changeset 5614 9b34aca7cd0c
parent 5613 1146efa21514
child 5615 3d77087a5a6c
6954621: small error in 6948909 Reviewed-by: xuelei
jdk/src/share/classes/sun/security/tools/JarSigner.java
--- 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