From: Hallvard Furuseth Date: Sat, 3 Mar 2012 08:49:20 +0000 (+0100) Subject: ITS#7191 Fix mdb_xcursor_init1() unaligned access X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~125^2~41 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d8b459808520027019987d19c79250cbf737f2c3;p=openldap ITS#7191 Fix mdb_xcursor_init1() unaligned access --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index f028ecb286..2a1cbb229e 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -4701,8 +4701,7 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) MDB_xcursor *mx = mc->mc_xcursor; if (node->mn_flags & F_SUBDATA) { - MDB_db *db = NODEDATA(node); - mx->mx_db = *db; + memcpy(&mx->mx_db, NODEDATA(node), sizeof(MDB_db)); mx->mx_cursor.mc_snum = 0; mx->mx_cursor.mc_flags = C_SUB; } else {