From: Arch Librarian Date: Thu, 14 Jul 2005 13:07:07 +0000 (+0000) Subject: 2005-04-13 Tollef Fog Heen X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c3ec8f4476a3ca7ff5b183482f9b6042bee83f7;p=pkg-config 2005-04-13 Tollef Fog Heen Author: tfheen Date: 2005-04-13 15:47:18 GMT 2005-04-13 Tollef Fog Heen * pkg.c (packages_get_l_libs, packages_get_L_libs): Duplicate singly linked list before putting it on list passed to string_list_strip_duplicates_from_back to avoid infinite loop when g_slist_copy tries to copy self-linked list. This happens if the user specifies the same name on the command line twice. --- diff --git a/ChangeLog b/ChangeLog index 0a5cd6d..bb6d64e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-04-13 Tollef Fog Heen + + * pkg.c (packages_get_l_libs, packages_get_L_libs): Duplicate + singly linked list before putting it on list passed to + string_list_strip_duplicates_from_back to avoid infinite loop when + g_slist_copy tries to copy self-linked list. This happens if the + user specifies the same name on the command line twice. + 2005-04-12 Tollef Fog Heen * configure.in: 0.17.1 diff --git a/pkg.c b/pkg.c index 7f430f6..3f895f1 100644 --- a/pkg.c +++ b/pkg.c @@ -1023,7 +1023,7 @@ packages_get_l_libs (GSList *pkgs, gboolean recurse) tmp = pkgs; while (tmp != NULL) { - dups_list = g_slist_concat (dups_list, get_l_libs(tmp->data)); + dups_list = g_slist_concat (dups_list, g_slist_copy(get_l_libs(tmp->data))); tmp = tmp->next; } @@ -1066,7 +1066,7 @@ packages_get_L_libs (GSList *pkgs, gboolean recurse) tmp = pkgs; while (tmp != NULL) { - dups_list = g_slist_concat (dups_list, get_L_libs(tmp->data)); + dups_list = g_slist_concat (dups_list, g_slist_copy(get_L_libs(tmp->data))); tmp = tmp->next; }