]> git.sur5r.net Git - openldap/commitdiff
Truncate \r if it appears at end of DB_CONFIG lines
authorHoward Chu <hyc@openldap.org>
Fri, 1 Apr 2005 12:06:46 +0000 (12:06 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 1 Apr 2005 12:06:46 +0000 (12:06 +0000)
servers/slapd/back-bdb/init.c

index 81899ed2d5d4a3a2c2e233c5af373b1b25343dcc..edcabcde091c752898f4b827a057af24c8147dcb 100644 (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 );