[Issue 10522] Heap-buffer-overflow in mdb_cursor_last