summaryrefslogtreecommitdiffstats
path: root/openssl/src/main
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
commitb7926325a1c1a370c84c81db80372f59af240a53 (patch)
treeb1d0214be443ea674d0ded8c502a8e074e50bdd2 /openssl/src/main
parent687f18b91f4a0a728a027579110953ee729adcb8 (diff)
downloadlibcore-b7926325a1c1a370c84c81db80372f59af240a53.zip
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.gz
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'openssl/src/main')
-rw-r--r--openssl/src/main/native/BNInterface.c12
1 files changed, 6 insertions, 6 deletions
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;