From 77c8584b25f6b8a307644d88dee1fca08ee93b25 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 9 Jul 2026 19:02:42 -0400 Subject: x509: tighten nss_compat BER check --- lib/libswan/x509dn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libswan/x509dn.c b/lib/libswan/x509dn.c index 10ee7d5a3c..4862ed5393 100644 --- a/lib/libswan/x509dn.c +++ b/lib/libswan/x509dn.c @@ -382,6 +382,7 @@ static err_t format_dn(struct jambuf *buf, asn1_t dn, * #BER. */ (nss_compatible && + value_content.len > 0 && ((const char*)value_content.ptr)[0] == '#')) { /* BER */ s += jam_string(buf, "#"); -- 2.47.3