https://bugs.openldap.org/show_bug.cgi?id=10340
--- Comment #1 from Alex Guo alexguo1023@gmail.com --- Additionally, later in `mdb_rebalance`, the code calls:
```c rc = mdb_page_merge(&mn, mc); … rc = mdb_page_merge(mc, &mn); ```
Inside `mdb_page_merge`, `mc_top` is similarly decremented and then used to index `mc_pg` without any preceding check. This same underflow risk exists there and should be guarded with this patch.