changeset 12769:91335bb140c2

Merge
author prr
date Tue, 08 Sep 2015 15:19:19 -0700
parents b348f693a10e cef7f168def1
children 7b9d345fc7ba
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Tue Sep 08 14:40:44 2015 -0700
+++ b/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Tue Sep 08 15:19:19 2015 -0700
@@ -430,17 +430,18 @@
  * Signature: (JZ[BI)I
  */
 jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal
-  (jlong pContext, jboolean encrypt, int outLen, jbyte* bufOut, jint outOfs) {
+  (jlong pContext, jboolean encrypt, int outLen, jbyte* out, jint outOfs) {
   crypto_ctx_t *context;
   int rv = 0;
+  unsigned char* bufOut = (unsigned char*) out;
 
   context = (crypto_ctx_t *) pContext;
   // Avoid null output buffer to workaround Solaris bug21481818 (fixed in S12)
   if (bufOut == NULL) {
-    bufOut = (unsigned char *)(&outLen);
+    bufOut = (unsigned char*)(&outLen);
     outLen = 0;
   }
-  rv = CipherFinal(context, encrypt, (unsigned char*)bufOut, outOfs, &outLen);
+  rv = CipherFinal(context, encrypt, bufOut, outOfs, &outLen);
   free(context);
   if (rv) {
      return -rv; // use negative value to indicate error!