queue_remove_if already updates entries count. This was resulting in entires being decremented twice resulting in integer overlfow. --- src/shared/queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/shared/queue.c b/src/shared/queue.c index ccf2f07..d94b34d 100644 --- a/src/shared/queue.c +++ b/src/shared/queue.c @@ -372,8 +372,6 @@ unsigned int queue_remove_all(struct queue *queue, queue_match_func_t function, count++; } - - queue->entries -= count; } else { queue->head = NULL; queue->tail = NULL; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html