]> git.sur5r.net Git - openldap/commitdiff
NUL-terminate undefined objectClass soc_cname (ITS#5682)
authorPierangelo Masarati <ando@openldap.org>
Thu, 4 Sep 2008 10:12:01 +0000 (10:12 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 4 Sep 2008 10:12:01 +0000 (10:12 +0000)
servers/slapd/oc.c

index 7fa10b01771c3292a60c56909aab9f558d44fcb6..508a3edcf34b4ef817bdd7e2ed7f9e3e55e25899 100644 (file)
@@ -227,6 +227,7 @@ oc_bvfind_undef( struct berval *ocname )
        oc->soc_cname.bv_len = ocname->bv_len;
        oc->soc_cname.bv_val = (char *)&oc[ 1 ];
        AC_MEMCPY( oc->soc_cname.bv_val, ocname->bv_val, ocname->bv_len );
+       oc->soc_cname.bv_val[ oc->soc_cname.bv_len ] = '\0';
 
        /* canonical to upper case */
        ldap_pvt_str2upper( oc->soc_cname.bv_val );