X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblutil%2Ffetch.c;h=661bc1e75b164b45cc9be39466a2d942ca1a2fe8;hb=d8eace75a7472731d78f61df01e648e8af8deee5;hp=904966619dc0db7d19e77e2fe25f55575a24110e;hpb=54adc170e577adc9bd90c445b6293a6f0ff04036;p=openldap diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c index 904966619d..661bc1e75b 100644 --- a/libraries/liblutil/fetch.c +++ b/libraries/liblutil/fetch.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1999-2005 The OpenLDAP Foundation. + * Copyright 1999-2006 The OpenLDAP Foundation. * Portions Copyright 1999-2003 Kurt D. Zeilenga. * All rights reserved. * @@ -40,8 +40,7 @@ FILE * ldif_open_url( - LDAP_CONST char *urlstr -) + LDAP_CONST char *urlstr ) { FILE *url; char *p = NULL; @@ -56,8 +55,10 @@ ldif_open_url( } /* we don't check for LDAP_DIRSEP since URLs should contain '/' */ - /* skip over false root */ - p++; + if( p[1] == '.' && ( p[2] == '/' || ( p[2] == '.' && p[3] == '/' ))) { + /* skip over false root */ + p++; + } p = ber_strdup( p ); ldap_pvt_hex_unescape( p ); @@ -76,8 +77,7 @@ int ldif_fetch_url( LDAP_CONST char *urlstr, char **valuep, - ber_len_t *vlenp -) + ber_len_t *vlenp ) { FILE *url; char buffer[1024];