]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10145 ldap_url_parse_ext: fail earlier on bad URL enclosure
authorHoward Chu <hyc@openldap.org>
Sat, 16 Dec 2023 14:01:46 +0000 (14:01 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 16 Dec 2023 14:01:46 +0000 (14:01 +0000)
libraries/libldap/url.c

index 8df0abd044f00e354331f950d83b8e54147ca9de..5ba0b4c62213a19b9fca3de700d38b976a1bfa77 100644 (file)
@@ -867,6 +867,10 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp, unsigned flags
        }
 
        if ( enclosed ) {
+               if ( ! *url ) {
+                       LDAP_FREE( url );
+                       return LDAP_URL_ERR_BADENCLOSURE;
+               }
                p = &url[strlen(url)-1];
 
                if( *p != '>' ) {