mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-05 14:42:10 -05:00
Further trim_refs_url fixes from Hallvard. Need additional testing.
This commit is contained in:
parent
e25287a90f
commit
b660f54bb4
1 changed files with 2 additions and 2 deletions
|
|
@ -78,12 +78,12 @@ static void trim_refs_urls(
|
|||
if( refs == NULL ) return;
|
||||
|
||||
for( i=0; refs[i] != NULL; i++ ) {
|
||||
if( refs[i]->bv_len > sizeof("ldap://") &&
|
||||
if( refs[i]->bv_len > sizeof("ldap://")-1 &&
|
||||
strncasecmp( refs[i]->bv_val, "ldap://",
|
||||
sizeof("ldap://")-1 ) == 0 )
|
||||
{
|
||||
unsigned j;
|
||||
for( j=sizeof("ldap://"); j<refs[i]->bv_len ; j++ ) {
|
||||
for( j=sizeof("ldap://")-1; j<refs[i]->bv_len ; j++ ) {
|
||||
if( refs[i]->bv_val[j] == '/' ) {
|
||||
refs[i]->bv_val[j] = '\0';
|
||||
refs[i]->bv_len = j;
|
||||
|
|
|
|||
Loading…
Reference in a new issue