changeset 356:a39343e9e197 HEAD

crashfix when growing tree file size
author Timo Sirainen <tss@iki.fi>
date Sun, 06 Oct 2002 03:37:27 +0300
parents 0dc59fd3faed
children 16d22ccf3f54
files src/lib-index/mail-tree-redblack.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-tree-redblack.c	Sun Oct 06 03:30:14 2002 +0300
+++ b/src/lib-index/mail-tree-redblack.c	Sun Oct 06 03:37:27 2002 +0300
@@ -722,6 +722,9 @@
 	if ((z = rb_alloc(tree)) == RBNULL)
 		return FALSE;
 
+	/* rb_alloc() may change mmap base */
+	node = tree->node_base;
+
 	node[z].key = uid;
 	node[z].value = pos;
 	node[z].up = x;