Truncate \r if it appears at end of DB_CONFIG lines

This commit is contained in:
Howard Chu 2005-04-01 12:06:46 +00:00
parent c808575c12
commit f9917a9c16

View file

@ -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 );