Segfault in NGINX - testcase

double nginx-forum at nginx.us
Thu Mar 25 22:30:53 MSK 2010


Sry, this is better:

static ngx_inline ngx_rbtree_node_t *
    ngx_rbtree_next(ngx_rbtree_t *rbtree, ngx_rbtree_node_t *node)
{
    if( node->right != rbtree->sentinel )
    {
        node = node->right;
        while( node->left != rbtree->sentinel )
            node = node->left;
    }
    else
    {
        ngx_rbtree_node_t *root;
        root = rbtree->root;
        while( node != root && node == node->parent->right )
            node = node->parent;
        if( node == root )
            return rbtree->sentinel;
        node = node->parent;
    }
    return node;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,65693,67808#msg-67808




More information about the nginx mailing list