]> err.no Git - pkg-config/commitdiff
* pkg.c (verify_package): Apply patch from Matthias Clasen of
authorTollef Fog Heen <tfheen@err.no>
Sat, 29 Dec 2007 15:46:25 +0000 (16:46 +0100)
committerTollef Fog Heen <tfheen@err.no>
Sat, 29 Dec 2007 15:46:25 +0000 (16:46 +0100)
RedHat to prevent segfaults if a Conflicts line is encountered.

ChangeLog
pkg.c

index f191c7ddfc88f3ad126d632c16d0f6ebca1d10a3..48b54ebc382e35a291257c5b250dc0a8cf980a51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-12-29  Tollef Fog Heen  <tfheen@err.no>
 
+       * pkg.c (verify_package): Apply patch from Matthias Clasen of
+       RedHat to prevent segfaults if a Conflicts line is encountered.
+
        * popthelp.c: Apply patch from Tom Tromey <tromey@redhat.com> to
        make pkg-config --help print to stdout, not stderr.  Gnome
        #127314.
diff --git a/pkg.c b/pkg.c
index bb2133744b8d5a81f87b75132494b4d451bf4230..a4bf905d57e40901ae87683df668581c62bfc84a 100644 (file)
--- a/pkg.c
+++ b/pkg.c
@@ -821,7 +821,7 @@ verify_package (Package *pkg)
    */
   
   recursive_fill_list (pkg, get_requires_private, &requires);
-  recursive_fill_list (pkg, get_conflicts, &conflicts);
+  conflicts = get_conflicts (pkg);
 
   requires_iter = requires;
   while (requires_iter != NULL)
@@ -843,7 +843,7 @@ verify_package (Package *pkg)
                              req->version, req->name,
                              ver->name,
                              comparison_to_str (ver->comparison),
-                             ver->version,
+                             ver->version ? ver->version : "(any)",
                              ver->owner->name,
                              ver->owner->version);
 
@@ -857,7 +857,6 @@ verify_package (Package *pkg)
     }
   
   g_slist_free (requires);
-  g_slist_free (conflicts);
 
   /* We make a list of system directories that gcc expects so we can remove
    * them.