]> git.sur5r.net Git - openldap/commitdiff
ITS#1714 dn->bv_val malloc len+1
authorHoward Chu <hyc@openldap.org>
Fri, 5 Apr 2002 06:34:15 +0000 (06:34 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 5 Apr 2002 06:34:15 +0000 (06:34 +0000)
servers/slapd/sasl.c

index 18d2847f6c1aece35be9628e2d50f9d2b8074fa4..ce037a693f14a90a2590330d07eddeca1ac58d5e 100644 (file)
@@ -220,7 +220,7 @@ int slap_sasl_getdn( Connection *conn, char *id,
 
                /* Build the new dn */
                c1 = dn->bv_val;
-               dn->bv_val = ch_malloc( len );
+               dn->bv_val = ch_malloc( len+1 );
                p = slap_strcopy( dn->bv_val, "uid=" );
                p = slap_strcopy( p, c1 );
                ch_free( c1 );