diff options
author | Kenny Root <kroot@google.com> | 2013-05-03 14:32:35 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-03 14:32:35 -0700 |
commit | 3b76df099cf82eb04ead1eac86723f0f427a4a13 (patch) | |
tree | 5c4de2200afbfb260cf5fc6bfa2f10900b51a9ff | |
parent | 4ed78bae40db94ba67985026a45a0f6843a7a890 (diff) | |
parent | aed4814bb1d769e87bec04682489cc10b891518f (diff) | |
download | libcore-3b76df099cf82eb04ead1eac86723f0f427a4a13.zip libcore-3b76df099cf82eb04ead1eac86723f0f427a4a13.tar.gz libcore-3b76df099cf82eb04ead1eac86723f0f427a4a13.tar.bz2 |
am aed4814b: Merge "NativeCrypto: exit early when ssl_session is null"
* commit 'aed4814bb1d769e87bec04682489cc10b891518f':
NativeCrypto: exit early when ssl_session is null
-rw-r--r-- | crypto/src/main/native/org_conscrypt_NativeCrypto.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp b/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp index ac1f321..562a614 100644 --- a/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp +++ b/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp @@ -7677,6 +7677,9 @@ static void NativeCrypto_SSL_SESSION_free(JNIEnv* env, jclass, jlong ssl_session static jbyteArray NativeCrypto_i2d_SSL_SESSION(JNIEnv* env, jclass, jlong ssl_session_address) { SSL_SESSION* ssl_session = to_SSL_SESSION(env, ssl_session_address, true); JNI_TRACE("ssl_session=%p NativeCrypto_i2d_SSL_SESSION", ssl_session); + if (ssl_session == NULL) { + return NULL; + } return ASN1ToByteArray<SSL_SESSION, i2d_SSL_SESSION>(env, ssl_session); } |