8081792: buffer size calculation issue in NativeGCMCipher
authorxuelei
Thu, 04 Jun 2015 00:19:16 +0000
changeset 30915 504f95d17f58
parent 30914 870f7227984a
child 30954 61eb4d31dcd1
8081792: buffer size calculation issue in NativeGCMCipher Reviewed-by: valeriep
jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeGCMCipher.java
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeGCMCipher.java	Wed Jun 03 14:35:17 2015 -0700
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeGCMCipher.java	Thu Jun 04 00:19:16 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -125,9 +125,7 @@
             if (ibuffer != null) {
                 result += ibuffer.size();
             }
-            if (isDoFinal) {
-                result -= tagLen/8;
-            }
+            result -= tagLen/8;
         }
         if (result < 0) {
             result = 0;