From 5e03941ee5fbd0cc69ac83e2dd6ad6d3e6d940cd Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 10 Oct 2009 23:57:10 +0200 Subject: alpm_list : fix a bug in alpm_list_remove A NULL list element triggered an infinite loop. Not cool :) Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- lib/libalpm/alpm_list.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 8b2c7b3e..127f72ac 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -309,6 +309,7 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl while(i) { if(i->data == NULL) { + i = i->next; continue; } tmp = i->next; -- cgit v1.2.3-24-g4f1b