summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2009-06-26 20:43:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2009-06-26 20:43:29 +0000
commitb25ed7f0adc759a78fae1ba556accf77777dc3ba (patch)
treefba51a1bc74d400b68f769692ec8d95db4a8c6be /usr.bin
parent22e398ef3cd1a7a392be0a6bfbbabdbde007b8b2 (diff)
Sync with sudo repo
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sudo/redblack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sudo/redblack.c b/usr.bin/sudo/redblack.c
index 555e9385f30..91c8586bba9 100644
--- a/usr.bin/sudo/redblack.c
+++ b/usr.bin/sudo/redblack.c
@@ -58,7 +58,7 @@
#include "redblack.h"
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: redblack.c,v 1.10 2008/11/22 15:01:25 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: redblack.c,v 1.11 2009/06/26 20:40:17 millert Exp $";
#endif /* lint */
static void rbrepair __P((struct rbtree *, struct rbnode *));
@@ -421,7 +421,7 @@ rbrepair(tree, node)
{
struct rbnode *sibling;
- while (node->color == black) {
+ while (node->color == black && node != rbroot(tree)) {
if (node == node->parent->left) {
sibling = node->parent->right;
if (sibling->color == red) {