]> git.sur5r.net Git - openldap/commitdiff
Fix alignment issues in hdb_dn2idl_internal
authorHoward Chu <hyc@openldap.org>
Tue, 23 Sep 2003 10:55:57 +0000 (10:55 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 23 Sep 2003 10:55:57 +0000 (10:55 +0000)
servers/slapd/back-bdb/dn2id.c

index 0dccf94bd5d01fdd5e1793d0ed8714a436d76e7e..8b3f5de64e345245f8e6e051454e95cfe1d7a75b 100644 (file)
@@ -995,9 +995,11 @@ hdb_dn2idl_internal(
                                if (j) {
                                        EntryInfo *ei2;
                                        diskNode *d = (diskNode *)j;
+                                       short nrlen;
 
                                        AC_MEMCPY( &ei.bei_id, &d->entryID, sizeof(ID) );
-                                       AC_MEMCPY( &ei.bei_nrdn.bv_len, &d->nrdnlen, sizeof(d->nrdnlen) );
+                                       AC_MEMCPY( &nrlen, &d->nrdnlen, sizeof(d->nrdnlen) );
+                                       ei.bei_nrdn.bv_len = nrlen;
                                        /* nrdn/rdn are set in-place.
                                         * hdb_cache_load will copy them as needed
                                         */