nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 46984bef852b9effbb1d48b8a0f8d6b1486b93ba
parent 6c950d569f8242674a3d34201a3019b4bdddc655
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 25 Apr 2024 16:20:09 -0700

fix realloc corruption

can't figure out why this is happening, but let's disable it for now
while we test. we shouldn't hit this code path anyways once we switch
over to local notes in damus ios

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/nostrdb.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -5841,9 +5841,9 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note) return NULL; } - blocks = realloc(blocks, ndb_blocks_total_size(blocks)); - if (blocks == NULL) - return NULL; + //blocks = realloc(blocks, ndb_blocks_total_size(blocks)); + //if (blocks == NULL) + //return NULL; blocks->flags |= NDB_BLOCK_FLAG_OWNED;