[PATCH 2/2] shared/queue: Fix queue_remove_all entires count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux