diff options
author | mm <mm@FreeBSD.org> | 2013-03-22 13:36:03 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2013-03-22 13:36:03 +0000 |
commit | 5ee0a7b76c4addc27bb45864cb4e0ce790a4b80e (patch) | |
tree | e741e3532b574e7c25aa9bb07c18cdb16139824f /contrib/libarchive/libarchive/archive_rb.c | |
parent | af89cb16bfde2fc8e93708b89daff55026d3b216 (diff) | |
parent | 366f42737cba40ceb2e83af8d17c61c0242703c5 (diff) | |
download | FreeBSD-src-5ee0a7b76c4addc27bb45864cb4e0ce790a4b80e.zip FreeBSD-src-5ee0a7b76c4addc27bb45864cb4e0ce790a4b80e.tar.gz |
MFV r248590,248594:
Update libarchive to 3.1.2
Some of new features:
- support for lrzip and grzip compression
- support for writing tar v7 format
- b64encode and uuencode filters
- support for __MACOSX directory in Zip archives
- support for lzop compresion (external utility)
Diffstat (limited to 'contrib/libarchive/libarchive/archive_rb.c')
-rw-r--r-- | contrib/libarchive/libarchive/archive_rb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/libarchive/libarchive/archive_rb.c b/contrib/libarchive/libarchive/archive_rb.c index 70bf7e6..5b5da20 100644 --- a/contrib/libarchive/libarchive/archive_rb.c +++ b/contrib/libarchive/libarchive/archive_rb.c @@ -237,6 +237,8 @@ __archive_rb_tree_reparent_nodes( struct archive_rb_node * const new_father = old_child; struct archive_rb_node * const new_child = old_father; + if (new_father == NULL) + return; /* * Exchange descendant linkages. */ @@ -552,6 +554,8 @@ __archive_rb_tree_removal_rebalance(struct archive_rb_tree *rbt, unsigned int other = which ^ RB_DIR_OTHER; struct archive_rb_node *brother = parent->rb_nodes[other]; + if (brother == NULL) + return;/* The tree may be broken. */ /* * For cases 1, 2a, and 2b, our brother's children must * be black and our father must be black @@ -573,6 +577,8 @@ __archive_rb_tree_removal_rebalance(struct archive_rb_tree *rbt, */ __archive_rb_tree_reparent_nodes(parent, other); brother = parent->rb_nodes[other]; + if (brother == NULL) + return;/* The tree may be broken. */ } else { /* * Both our parent and brother are black. @@ -656,6 +662,8 @@ __archive_rb_tree_removal_rebalance(struct archive_rb_tree *rbt, * If we had two red nephews, then after the swap, * our former father would have a red grandson. */ + if (brother->rb_nodes[other] == NULL) + return;/* The tree may be broken. */ RB_MARK_BLACK(brother->rb_nodes[other]); __archive_rb_tree_reparent_nodes(parent, other); break; /* We're done! */ |