Merge
authorprr
Tue, 08 Sep 2015 15:19:19 -0700
changeset 32673 413efa102b75
parent 32672 603769b32d27 (current diff)
parent 32499 0a653603f68f (diff)
child 32674 97d6f0254860
Merge
--- a/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Tue Sep 08 14:40:44 2015 -0700
+++ b/jdk/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!