Package: libmrss0 Version: 0.19.2-1 Followup-For: Bug #503225 The attached patch forces libmrss to use the first <link> element with a rel="alternate" attribute when parsing Atom feeds.
-- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libmrss0 depends on: ii libc6 2.7-15 GNU C Library: Shared libraries ii libcurl3-gnutls 7.18.2-7 Multi-protocol file transfer libra ii libnxml0 [libnxml-abi-0.18.3] 0.18.3-2 C library for parsing, writing and libmrss0 recommends no packages. libmrss0 suggests no packages. -- no debconf information -- Byron Clark
diff -Naur libmrss-0.19.2/src/mrss_parser.c libmrss-0.19.2.atom/src/mrss_parser.c --- libmrss-0.19.2/src/mrss_parser.c 2008-08-21 15:59:22.000000000 -0600 +++ libmrss-0.19.2.atom/src/mrss_parser.c 2008-10-23 12:19:52.000000000 -0600 @@ -345,7 +345,7 @@ static void __mrss_parser_atom_entry (nxml_t * doc, nxml_data_t * cur, mrss_t * data) { - char *c; + char *c, *t; mrss_item_t *item; if (!(item = malloc (sizeof (mrss_item_t)))) @@ -365,7 +365,9 @@ &item->title_type); /* link href -> link */ - else if (!item->link && !strcmp (cur->value, "link") + else if (!item->link && !strcmp (cur->value, "link") + && (t = nxmle_find_attribute (cur, "rel", NULL)) + && !strcmp (t, "alternate") && (c = nxmle_find_attribute (cur, "href", NULL))) item->link = c;