2005-04-13 Tollef Fog Heen <tfheen@err.no>

Author: tfheen
Date: 2005-04-13 15:47:18 GMT
2005-04-13  Tollef Fog Heen  <tfheen@err.no>

    * 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.
This commit is contained in:
Arch Librarian 2005-07-14 13:07:07 +00:00
parent 48ce9b7caa
commit 6c3ec8f447
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2005-04-13 Tollef Fog Heen <tfheen@err.no>
* 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 <tfheen@err.no>
* configure.in: 0.17.1

4
pkg.c
View file

@ -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;
}