objs has been incorrectly passed from one critical section to another
one.
Resolves: https://scan5.scan.coverity.com/#/project-view/65138/10222?selectedIssue=
1667132
Fixes: 04589b59ef50 ("x509store: reduce lock contention in X509_STORE")
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28947)
objs = ossl_x509_store_ht_get_by_name(store, nm);
if (objs == NULL)
goto end;
+ } else {
+ objs = store->objs;
}
idx = x509_object_idx_cnt(objs, X509_LU_X509, nm, &cnt);
}