From: Howard Chu Date: Fri, 1 Apr 2005 12:06:46 +0000 (+0000) Subject: Truncate \r if it appears at end of DB_CONFIG lines X-Git-Tag: OPENLDAP_AC_BP~1017 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f9917a9c162d4add15da6caa18eef7c61a91e350;p=openldap Truncate \r if it appears at end of DB_CONFIG lines --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 81899ed2d5..edcabcde09 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -393,6 +393,11 @@ bdb_db_open( BackendDB *be ) bv.bv_len--; bv.bv_val[bv.bv_len] = '\0'; } + /* shouldn't need this, but ... */ + if ( bv.bv_val[bv.bv_len-1] == '\r' ) { + bv.bv_len--; + bv.bv_val[bv.bv_len] = '\0'; + } ber_bvarray_add( &bdb->bi_db_config, &bv ); } fclose( f );