From 6ed2864bc3bef06d2b568710288ac12b2dcc7bb2 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Thu, 16 Apr 2026 23:08:43 +0200 Subject: [PATCH] alg comparison now correctly returns 0 when one hash is NULL --- src/pk/asn1/x509/x509_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pk/asn1/x509/x509_utils.c b/src/pk/asn1/x509/x509_utils.c index 00817de6..000dbc9a 100644 --- a/src/pk/asn1/x509/x509_utils.c +++ b/src/pk/asn1/x509/x509_utils.c @@ -71,6 +71,8 @@ static LTC_INLINE int s_signature_algorithms_equal(const ltc_x509_signature_algo else if (a->u.hash != NULL && b->u.hash != NULL) { if (XSTRCMP(a->u.hash, b->u.hash) != 0) return 0; + } else if (a->u.hash != b->u.hash) { + return 0; } return 1; }