From 7b5980fd6427eae48e739d5cf6a543e800d9823e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 28 Jan 2026 10:25:55 +0000 Subject: [PATCH] ITS#10429 Empty types are not valid LDIF, reject sooner --- libraries/libldap/ldif.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/libldap/ldif.c b/libraries/libldap/ldif.c index 33bebb59a5..9ed37eb114 100644 --- a/libraries/libldap/ldif.c +++ b/libraries/libldap/ldif.c @@ -136,6 +136,14 @@ ldif_parse_line2( *s++ = '\0'; type->bv_len = p - type->bv_val + 1; + if ( BER_BVISEMPTY( type ) ) { + /* no type is present, error out */ + ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug, + _("ldif_parse_line: empty type is invalid\n") ); + if ( !freeval ) ber_memfree( line ); + return( -1 ); + } + url = 0; b64 = 0;