damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 4686b7aca6e0940f522e488fc7d36e5cfdb07925
parent b80bab35b8f1538cc0e1070526402631f55df0a4
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 26 Jan 2024 11:13:52 -0800

lmdb: fix weird crash in lmdb. need to follow up upstream

I may be something dumb, so asking the LMDB why this is crashing here
might enlighten us.

Diffstat:
Mnostrdb/midl.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/nostrdb/midl.c b/nostrdb/midl.c @@ -171,6 +171,12 @@ int mdb_midl_append( MDB_IDL *idp, MDB_ID id ) int mdb_midl_append_list( MDB_IDL *idp, MDB_IDL app ) { MDB_IDL ids = *idp; + + if (ids == 0) { + printf("txn: HITTING MDB_MIDL_APPEND NULL IDS\n"); + return EINVAL; + } + /* Too big? */ if (ids[0] + app[0] >= ids[-1]) { if (mdb_midl_grow(idp, app[0]))