From b7926325a1c1a370c84c81db80372f59af240a53 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 10 Feb 2009 15:43:57 -0800 Subject: auto import from //branches/cupcake/...@130745 --- openssl/src/main/native/BNInterface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openssl/src/main') diff --git a/openssl/src/main/native/BNInterface.c b/openssl/src/main/native/BNInterface.c index 6026d55..4132e4f 100644 --- a/openssl/src/main/native/BNInterface.c +++ b/openssl/src/main/native/BNInterface.c @@ -421,10 +421,10 @@ static jbyteArray NativeBN_BN_bn2bin(JNIEnv* env, jclass cls, BIGNUM* a, jbyteAr // FIXME: Currently ignoring array passed in to: returnJBytes = (*env)->NewByteArray(env, byteCnt); // FIXME: is it neccessary to check for returnJBytes != NULL? - tmpBytes = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, returnJBytes, 0)); + tmpBytes = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, returnJBytes, NULL)); if (tmpBytes != NULL) { len = BN_bn2bin(a, tmpBytes); - (*env)->ReleasePrimitiveArrayCritical(env, returnJBytes, tmpBytes, JNI_ABORT); + (*env)->ReleasePrimitiveArrayCritical(env, returnJBytes, tmpBytes, 0); return returnJBytes; } else return NULL; @@ -443,10 +443,10 @@ static jintArray NativeBN_bn2litEndInts(JNIEnv* env, jclass cls, BIGNUM* a, jint // FIXME: Currently ignoring array passed in to: returnJInts = (*env)->NewIntArray(env, len); // FIXME: is it neccessary to check for returnJBytes != NULL? - BN_ULONG* tmpInts = (BN_ULONG*)((*env)->GetPrimitiveArrayCritical(env, returnJInts, 0)); + BN_ULONG* tmpInts = (BN_ULONG*)((*env)->GetPrimitiveArrayCritical(env, returnJInts, NULL)); if (tmpInts != NULL) { int i = len; do { i--; tmpInts[i] = a->d[i]; } while (i > 0); - (*env)->ReleasePrimitiveArrayCritical(env, returnJInts, tmpInts, JNI_ABORT); + (*env)->ReleasePrimitiveArrayCritical(env, returnJInts, tmpInts, 0); return returnJInts; } else return NULL; @@ -468,10 +468,10 @@ static jbyteArray NativeBN_bn2twosComp(JNIEnv* env, jclass cls, BIGNUM* a, jbyte // FIXME: Currently ignoring array passed in to: returnJBytes = (*env)->NewByteArray(env, byteCnt); // FIXME: is it neccessary to check for returnJBytes != NULL? - tmpBytes = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, returnJBytes, 0)); + tmpBytes = (unsigned char *)((*env)->GetPrimitiveArrayCritical(env, returnJBytes, NULL)); if (tmpBytes != NULL) { len = BN_bn2bin(a, tmpBytes); - (*env)->ReleasePrimitiveArrayCritical(env, returnJBytes, tmpBytes, JNI_ABORT); + (*env)->ReleasePrimitiveArrayCritical(env, returnJBytes, tmpBytes, 0); return returnJBytes; } else return NULL; -- cgit v1.1