From fa4eae9d909e35be9ec17c535d9ccb92148c60ac Mon Sep 17 00:00:00 2001 From: xuelei Date: Sun, 30 Oct 2011 20:07:45 -0700 Subject: [PATCH] 7106277: Brokenness in the seqNumberOverflow of MAC Reviewed-by: wetmore --- src/share/classes/sun/security/ssl/MAC.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/share/classes/sun/security/ssl/MAC.java b/src/share/classes/sun/security/ssl/MAC.java index 8002148a9..ae5c9d43b 100644 --- a/src/share/classes/sun/security/ssl/MAC.java +++ b/src/share/classes/sun/security/ssl/MAC.java @@ -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 @@ final class MAC { * 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 @@ final class MAC { * 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 -- GitLab