From 466ceb02a11e850a6496ac1c0f5a80d8671bdfa7 Mon Sep 17 00:00:00 2001 From: Ingo Franzki Date: Wed, 26 May 2021 11:29:25 +0200 Subject: [PATCH] libekmfweb: Fix certificate extensions compare function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correctly dereference the extensions passed to the compare function. Signed-off-by: Ingo Franzki Signed-off-by: Jan Höppner --- libekmfweb/utilities.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libekmfweb/utilities.c b/libekmfweb/utilities.c index 3eaeb293..d0f93678 100644 --- a/libekmfweb/utilities.c +++ b/libekmfweb/utilities.c @@ -3230,12 +3230,12 @@ int build_subject_name(X509_NAME **name, const char *rdns[], size_t num_rdns, /** * Compares X509 Extensions by their nid */ -static int X509_EXTENSION_compfunc(const X509_EXTENSION * const* a, - const X509_EXTENSION * const* b) +static int X509_EXTENSION_compfunc(const X509_EXTENSION * const *a, + const X509_EXTENSION * const *b) { - return (OBJ_obj2nid(X509_EXTENSION_get_object((X509_EXTENSION *)a)) - - OBJ_obj2nid(X509_EXTENSION_get_object((X509_EXTENSION *)b))); + return (OBJ_obj2nid(X509_EXTENSION_get_object((X509_EXTENSION *)*a)) - + OBJ_obj2nid(X509_EXTENSION_get_object((X509_EXTENSION *)*b))); } /**