summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/checksums.ini6
-rw-r--r--packages/libmrss/files/atom-right-date.patch15
-rw-r--r--packages/libmrss/files/better-parse-url-r0.patch90
-rw-r--r--packages/libmrss/libmrss_0.17.2.bb (renamed from packages/libmrss/libmrss_0.17.1.bb)2
4 files changed, 94 insertions, 19 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini
index b4e526b61b..ce7c9adf7b 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -9690,9 +9690,9 @@ sha256=ab7c305be32708c4ede670e13783b718e6a28e35b5495e6c42c31c35a8b512a6
md5=18c05d88e22c3b815a43ca8d7152ccdc
sha256=8dd9dd61a0fe56904f5b76ddedb99bd359abaaf486e0b83b45e3357fecc81063
-[http://www2.autistici.org/bakunin/libmrss/libmrss-0.17.1.tar.gz]
-md5=bc6f32759db02cf32a83640d74fb9993
-sha256=cfa9b2d0f9b87a7a524abe149e7207adf86c077749c907342df63126a7ec292d
+[http://www2.autistici.org/bakunin/libmrss/libmrss-0.17.2.tar.gz]
+md5=54935c6cff42df2f1daada267b701392
+sha256=18f0e2df191219c29b47dc12b4b06b5be7eaeef34b3436156547e5a9f4eb51c1
[http://www2.autistici.org/bakunin/libnxml/libnxml-0.16.tar.gz]
md5=85b6a42a9e17a23c01b2f2ed0ece0563
diff --git a/packages/libmrss/files/atom-right-date.patch b/packages/libmrss/files/atom-right-date.patch
deleted file mode 100644
index ba231b2ab4..0000000000
--- a/packages/libmrss/files/atom-right-date.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-tm_mon goes from 0-11 written dates from 1-12. It is too late to consider security
-here. The worst that can happen is that tm_mon == 0 gets negative but I assume
-glibc to do range checking.
-Index: libmrss-0.17.1/src/mrss_parser.c
-===================================================================
---- libmrss-0.17.1.orig/src/mrss_parser.c 2007-04-08 02:42:23.000000000 +0200
-+++ libmrss-0.17.1/src/mrss_parser.c 2007-04-08 02:43:37.000000000 +0200
-@@ -150,6 +150,7 @@
- {
- char datebuf[256];
- stm.tm_year -= 1900;
-+ stm.tm_mon -= 1;
-
- if (!data->c_locale
- && !(data->c_locale = newlocale (LC_ALL_MASK, "C", NULL)))
diff --git a/packages/libmrss/files/better-parse-url-r0.patch b/packages/libmrss/files/better-parse-url-r0.patch
new file mode 100644
index 0000000000..94a78110a2
--- /dev/null
+++ b/packages/libmrss/files/better-parse-url-r0.patch
@@ -0,0 +1,90 @@
+Index: libmrss-0.17.2/src/mrss.h
+===================================================================
+--- libmrss-0.17.2.orig/src/mrss.h 2007-04-02 14:42:55.000000000 +0200
++++ libmrss-0.17.2/src/mrss.h 2007-05-19 20:56:08.000000000 +0200
+@@ -523,6 +523,22 @@
+ mrss_t ** mrss,
+ mrss_options_t * options);
+
++/**
++ * Like the previous function but you take ownership of the downloaded buffer in case of success
++ * \param url The url to be parsed
++ * \param mrss the pointer to your data struct
++ * \param options a pointer to a options data struct
++ * \param feed_content a pointer to the buffer with the document. This is not NULL terminated
++ * \param feed_size the size of the buffer above
++ * \return the error code
++ */
++mrss_error_t mrss_parse_url_and_transfer_buffer
++ (char * url,
++ mrss_t ** mrss,
++ mrss_options_t * options,
++ char ** feed_content,
++ int * feed_size);
++
+ /**
+ * Parses a file and creates the data struct of the feed RSS url
+ * \param file The file to be parsed
+Index: libmrss-0.17.2/src/mrss_parser.c
+===================================================================
+--- libmrss-0.17.2.orig/src/mrss_parser.c 2007-05-19 20:47:08.000000000 +0200
++++ libmrss-0.17.2/src/mrss_parser.c 2007-05-19 20:56:37.000000000 +0200
+@@ -1075,13 +1075,20 @@
+ mrss_error_t
+ mrss_parse_url (char *url, mrss_t ** ret)
+ {
+- return mrss_parse_url_with_options (url, ret, NULL);
++ return mrss_parse_url_and_transfer_buffer (url, ret, NULL, NULL, NULL);
+ }
+
+ mrss_error_t
+ mrss_parse_url_with_options (char *url, mrss_t ** ret,
+ mrss_options_t * options)
+ {
++ return mrss_parse_url_and_transfer_buffer (url, ret, options, NULL, NULL);
++}
++
++mrss_error_t
++mrss_parse_url_and_transfer_buffer (char *url, mrss_t ** ret,
++ mrss_options_t * options, char **download_buffer, int *download_size)
++{
+ nxml_t *doc;
+ mrss_error_t err;
+ char *buffer;
+@@ -1117,7 +1124,8 @@
+
+ if (nxml_parse_buffer (doc, buffer, size) != NXML_OK)
+ {
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+ nxml_free (doc);
+
+ return MRSS_ERR_PARSER;
+@@ -1127,7 +1135,8 @@
+ {
+ if (!((*ret)->file = strdup (url)))
+ {
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+
+ mrss_free (*ret);
+ nxml_free (doc);
+@@ -1138,9 +1147,15 @@
+ (*ret)->size = size;
+ }
+
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+ nxml_free (doc);
+
++ /* transfer ownership */
++ if (download_buffer)
++ *download_buffer = buffer;
++ if (download_size)
++ *download_size = size;
+ return err;
+ }
+
diff --git a/packages/libmrss/libmrss_0.17.1.bb b/packages/libmrss/libmrss_0.17.2.bb
index 6476ee58c6..f536468479 100644
--- a/packages/libmrss/libmrss_0.17.1.bb
+++ b/packages/libmrss/libmrss_0.17.2.bb
@@ -8,7 +8,7 @@ PR = "r1"
inherit autotools pkgconfig
SRC_URI = "http://www2.autistici.org/bakunin/libmrss/libmrss-${PV}.tar.gz \
- file://atom-right-date.patch;patch=1 "
+ file://better-parse-url-r0.patch;patch=1 "
do_stage() {
autotools_stage_all