ITS#10145 ldap_url_parse_ext: fail earlier on bad URL enclosure

This commit is contained in:
Howard Chu 2023-12-16 14:01:46 +00:00
parent 4c80d78dcc
commit e40d3640a7

View 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 != '>' ) {