packages/libmrss: Correct the month of atom dates
authorHolger Freyther <zecke@selfish.org>
Sun, 8 Apr 2007 01:10:59 +0000 (01:10 +0000)
committerHolger Freyther <zecke@selfish.org>
Sun, 8 Apr 2007 01:10:59 +0000 (01:10 +0000)
packages/libmrss/files/.mtn2git_empty [new file with mode: 0644]
packages/libmrss/files/atom-right-date.patch [new file with mode: 0644]
packages/libmrss/libmrss_0.17.1.bb

diff --git a/packages/libmrss/files/.mtn2git_empty b/packages/libmrss/files/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/libmrss/files/atom-right-date.patch b/packages/libmrss/files/atom-right-date.patch
new file mode 100644 (file)
index 0000000..ba231b2
--- /dev/null
@@ -0,0 +1,15 @@
+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)))
index fe2e87c..6476ee5 100644 (file)
@@ -3,11 +3,12 @@ LICENSE = "LGPL"
 HOMEPAGE = "http://www2.autistici.org/bakunin/codes.php"
 
 DEPENDS = "libnxml curl"
-PR      = "r0"
+PR      = "r1"
 
 inherit autotools pkgconfig
 
-SRC_URI = "http://www2.autistici.org/bakunin/libmrss/libmrss-${PV}.tar.gz"
+SRC_URI = "http://www2.autistici.org/bakunin/libmrss/libmrss-${PV}.tar.gz \
+           file://atom-right-date.patch;patch=1                           "
 
 do_stage() {
     autotools_stage_all