From f9917a9c162d4add15da6caa18eef7c61a91e350 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 1 Apr 2005 12:06:46 +0000 Subject: [PATCH] Truncate \r if it appears at end of DB_CONFIG lines --- servers/slapd/back-bdb/init.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ); -- 2.39.5