]> git.sur5r.net Git - openldap/commitdiff
ITS#8819 can't use fakepage mp_ptrs directly
authorHoward Chu <hyc@openldap.org>
Tue, 20 Mar 2018 18:34:56 +0000 (18:34 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 21 Mar 2018 22:48:04 +0000 (22:48 +0000)
libraries/liblmdb/mdb.c

index e31867de8207a9f0476c0707185e107f6feee4fa..dfd7d0053e2231fe8706f0955d28e826f998cfaa 100644 (file)
@@ -6799,8 +6799,9 @@ prep_subDB:
                                } else {
                                        memcpy((char *)mp + mp->mp_upper + PAGEBASE, (char *)fp + fp->mp_upper + PAGEBASE,
                                                olddata.mv_size - fp->mp_upper - PAGEBASE);
+                                       memcpy((char *)(&mp->mp_ptrs), (char *)(&fp->mp_ptrs), NUMKEYS(fp) * sizeof(mp->mp_ptrs[0]));
                                        for (i=0; i<NUMKEYS(fp); i++)
-                                               mp->mp_ptrs[i] = fp->mp_ptrs[i] + offset;
+                                               mp->mp_ptrs[i] += offset;
                                }
                        }