From: Pierangelo Masarati Date: Thu, 4 Sep 2008 10:12:01 +0000 (+0000) Subject: NUL-terminate undefined objectClass soc_cname (ITS#5682) X-Git-Tag: ACLCHECK_0~1385 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=374d8f85ae594020315c71796cbac201e886407d;p=openldap NUL-terminate undefined objectClass soc_cname (ITS#5682) --- diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 7fa10b0177..508a3edcf3 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -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 );