]> git.sur5r.net Git - openldap/commitdiff
Unhex url extensions.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Jul 1999 20:44:40 +0000 (20:44 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Jul 1999 20:44:40 +0000 (20:44 +0000)
libraries/libldap/url.c

index 97b01b8aae9e86c699cc8a0d1e13e57caa67a7c6..aa5b27645ff90dca69fb697bb1ede0a5db46ed70 100644 (file)
@@ -161,7 +161,7 @@ ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
 
        LDAPURLDesc     *ludp;
        char    *p, *q;
-       int             enclosed, ldaps;
+       int             i, enclosed, ldaps;
        const char *url_tmp;
        char *url;
 
@@ -402,6 +402,17 @@ ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
                return LDAP_URL_ERR_BADEXTS;
        }
 
+       for( i=0; ludp->lud_exts[i] != NULL; i++ ) {
+               hex_unescape( ludp->lud_exts[i] );
+       }
+
+       if( i == 0 ) {
+               ldap_charray_free( ludp->lud_exts );
+               LDAP_FREE( url );
+               ldap_free_urldesc( ludp );
+               return LDAP_URL_ERR_BADEXTS;
+       }
+
        *ludpp = ludp;
 
        LDAP_FREE( url );