]> 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)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 16 Jan 2024 19:15:49 +0000 (19:15 +0000)
libraries/libldap/url.c

index 493fd7ce47c4ed0f4cd417329691f3e1d296617d..a56af3093c5bc38ab9e74c3a8822b3b4adc8c770 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 != '>' ) {