summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-10-10 23:57:10 +0200
committerDan McGee <dan@archlinux.org>2009-10-11 12:55:55 -0500
commit5e03941ee5fbd0cc69ac83e2dd6ad6d3e6d940cd (patch)
treeccdd635f7970dd6f1e168c15e2e9cb2609324475 /lib
parentf15c8d46166a4774028b32407cd1477990130911 (diff)
downloadpacman-5e03941ee5fbd0cc69ac83e2dd6ad6d3e6d940cd.tar.xz
alpm_list : fix a bug in alpm_list_remove
A NULL list element triggered an infinite loop. Not cool :) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm_list.c1
1 files changed, 1 insertions, 0 deletions
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;