changeset 2405:c36617d0dae7

6954621: small error in 6948909 Reviewed-by: xuelei
author weijun
date Mon, 24 May 2010 09:28:25 +0800
parents d01726854317
children ff9cc9789bb3
files src/share/classes/sun/security/tools/JarSigner.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/tools/JarSigner.java	Mon May 24 09:28:06 2010 +0800
+++ b/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