pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/tin Fix a core dump when listing an mhbox thread.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28802dc8bf8b
branches:  trunk
changeset: 562183:28802dc8bf8b
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Jul 22 10:53:51 2009 +0000

description:
Fix a core dump when listing an mhbox thread.
>From Urs Janßen (upstream). Ride update.

diffstat:

 news/tin/distinfo         |   3 +-
 news/tin/patches/patch-ac |  51 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 1 deletions(-)

diffs (68 lines):

diff -r be0ec3df29f6 -r 28802dc8bf8b news/tin/distinfo
--- a/news/tin/distinfo Wed Jul 22 10:33:21 2009 +0000
+++ b/news/tin/distinfo Wed Jul 22 10:53:51 2009 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.15 2009/07/22 10:00:17 wiz Exp $
+$NetBSD: distinfo,v 1.16 2009/07/22 10:53:51 wiz Exp $
 
 SHA1 (tin-1.9.4.tar.bz2) = e1f5ff2f04923137f43119b144f8a20e733eea23
 RMD160 (tin-1.9.4.tar.bz2) = 6a85e47ea06f2e86f2b8f688df137432ecb7c4e9
 Size (tin-1.9.4.tar.bz2) = 1526534 bytes
 SHA1 (patch-aa) = a3d40ff4e38230bcf8a3814c92ec2a75f85bf44e
 SHA1 (patch-ab) = 34794d259ae4fb81888184ded9876ab5874d8731
+SHA1 (patch-ac) = b5e72a659414833db5f18c2e8f3404dadd03f87f
diff -r be0ec3df29f6 -r 28802dc8bf8b news/tin/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/tin/patches/patch-ac Wed Jul 22 10:53:51 2009 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-ac,v 1.4 2009/07/22 10:53:51 wiz Exp $
+
+--- src/refs.c.orig    2008-12-30 20:26:24.000000000 +0100
++++ src/refs.c 2009-07-22 12:51:11.000000000 +0200
+@@ -56,7 +56,7 @@
+ static struct t_msgid *add_msgid(int key, const char *msgid, struct t_msgid *newparent);
+ static struct t_msgid *find_next(struct t_msgid *ptr);
+ static struct t_msgid *parse_references(char *r);
+-static t_bool valid_msgid(const char *msgid);
++static t_bool valid_msgid(char *msgid);
+ static unsigned int hash_msgid(const char *key);
+ static void add_to_parent(struct t_msgid *ptr);
+ static void build_thread(struct t_msgid *ptr);
+@@ -176,15 +176,16 @@
+  * Checks if Message-ID has valid format
+  * Returns TRUE if it does, FALSE if it does not
+  *
+- * TODO: combine with post.c:damaged_id()?
++ * TODO: combine with post.c:damaged_id()
+  */
+ static t_bool
+ valid_msgid(
+-      const char *msgid)
++      char *msgid)
+ {
+       size_t mlen = 0;
+       t_bool at_present = 0;
+ 
++      str_trim(msgid);
+       if (!msgid || *msgid != '<')
+               return FALSE;
+ 
+@@ -968,6 +969,7 @@
+       for_each_art(i) {
+               art = &arts[i];
+ 
++              art->refptr = add_msgid(MSGID_REF, art->msgid, NULL); /* preset art->refptr */
+               if (art->refs) {
+                       strip_line(art->refs);
+ 
+@@ -999,9 +1001,7 @@
+                                       art->refptr = add_msgid(MSGID_REF, art->msgid, add_msgid(REF_REF, art->refs, NULL));
+                               FreeAndNull(art->refs);
+                       }
+-              } else
+-                      if (valid_msgid(art->msgid))
+-                              art->refptr = add_msgid(MSGID_REF, art->msgid, NULL);
++              }
+               FreeAndNull(art->msgid);        /* Now cached - discard this */
+       }
+ 



Home | Main Index | Thread Index | Old Index