This patch fixes a bug in apr_table_overlap: when using the
APR_OVERLAP_TABLES_SET option, the red-black tree's shape
properties were sometimes broken, which could cause a segfault
if it happened at the root node of the tree.

--Brian


Index: srclib/apr/tables/apr_tables.c
===================================================================
RCS file: /home/cvspublic/apr/tables/apr_tables.c,v
retrieving revision 1.20
diff -u -r1.20 apr_tables.c
--- srclib/apr/tables/apr_tables.c      2001/12/08 05:01:59     1.20
+++ srclib/apr/tables/apr_tables.c      2001/12/08 22:40:49
@@ -844,6 +844,7 @@
                         next->tree_right->tree_parent = elt;
                     }
                     elt->tree_parent = next->tree_parent;
+                    elt->color = next->color;
                     (*child) = elt;
                     elt->merge_next = NULL;
                     elt->merge_last = NULL;

Reply via email to