diff options
author | Alexander Kurtakov | 2017-05-04 12:57:27 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-05-04 13:07:23 +0000 |
commit | ab5fb3dd359bbdc94282582aba96d8dfac128107 (patch) | |
tree | 1fb5c2a91fe06e183874db48fb1fa37737ef6d43 | |
parent | 4e3798e3b05063afd9c19b44dbcb5cb78ad95363 (diff) | |
download | rt.equinox.bundles-ab5fb3dd359bbdc94282582aba96d8dfac128107.tar.gz rt.equinox.bundles-ab5fb3dd359bbdc94282582aba96d8dfac128107.tar.xz rt.equinox.bundles-ab5fb3dd359bbdc94282582aba96d8dfac128107.zip |
Bug 515880 - DNF (crash) in core.tests.netY20170504-1000I20170504-2000
secret_collection_for_alias_sync can return null if it fails to find the
collection. Guard it.
Change-Id: I502fce0c6ad85d8597328968e0053c53321b0722
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c | 5 | ||||
-rwxr-xr-x | bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so | bin | 12992 -> 12992 bytes |
2 files changed, 5 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c b/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c index 9cb178a74..987a291d8 100644 --- a/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c +++ b/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c @@ -61,6 +61,11 @@ static void unlock_secret_service(JNIEnv *env) g_error_free (error); return; } + if (defaultcollection == NULL) { + (*env)->ExceptionClear(env); + (*env)->ThrowNew(env, (* env)->FindClass(env, "java/lang/SecurityException"), "Unable to find default secret collection"); + return; + } if (secret_collection_get_locked(defaultcollection)) { diff --git a/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so b/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so Binary files differindex c32e763cd..7b96879d7 100755 --- a/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so +++ b/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so |