changeset 4881:30900a1a9cfc

7106277: Brokenness in the seqNumberOverflow of MAC Reviewed-by: wetmore
author xuelei
date Sun, 30 Oct 2011 20:07:45 -0700
parents bb2b9a8b6e77
children 8681362a2f04 1945abeb82a0
files src/share/classes/sun/security/ssl/MAC.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/MAC.java	Sun Oct 30 14:53:43 2011 +0000
+++ b/src/share/classes/sun/security/ssl/MAC.java	Sun Oct 30 20:07:45 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -172,10 +172,10 @@
          * when there are only 2^8 sequence numbers left.
          */
         return (block != null && mac != null &&
-                block[0] == 0xFF && block[1] == 0xFF &&
-                block[2] == 0xFF && block[3] == 0xFF &&
-                block[4] == 0xFF && block[5] == 0xFF &&
-                block[6] == 0xFF);
+                block[0] == (byte)0xFF && block[1] == (byte)0xFF &&
+                block[2] == (byte)0xFF && block[3] == (byte)0xFF &&
+                block[4] == (byte)0xFF && block[5] == (byte)0xFF &&
+                block[6] == (byte)0xFF);
     }
 
     /*
@@ -192,7 +192,7 @@
          * only 2^48 sequence numbers left.
          */
         return (block != null && mac != null &&
-                block[0] == 0xFF && block[1] == 0xFF);
+                block[0] == (byte)0xFF && block[1] == (byte)0xFF);
     }
 
     // increment the sequence number in the block array