* libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references
@ 2015-08-17 21:35 ` Eric Wong
[not found] ` <rt-4.0.18-6738-1439849660-1489.106498-3-0@rt.cpan.org>
[not found] ` <handler.795913.B.143984774816522.ack@bugs.debian.org>
0 siblings, 2 replies; 4+ messages in thread
From: Eric Wong @ 2015-08-17 21:35 UTC (permalink / raw)
To: Debian Bug Tracking System; +Cc: bug-Mail-Thread, meta
[-- Attachment #1: Type: text/plain, Size: 634 bytes --]
Package: libmail-thread-perl
Version: 2.55-1
Severity: normal
Tags: upstream patch
Dear Maintainer,
With incomplete threads, It is possible to for the topmost subroutine to
return undef, so do not blindy assume the simple_subject call will be
made on a Mail::Thread::Container object.
Attached is a patch which avoids the issue by skipping as if the
subject were empty.
Note: upstream hasn't been responsive in years, but Cc-ing the RT
address at CPAN just in case.
-- System Information:
Debian Release: 7.8
APT prefers oldstable-updates
APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
-- no debconf information
[-- Attachment #2: 0001-avoid-failing-grouping-by-subject-with-missing-refer.patch --]
[-- Type: text/x-diff, Size: 1465 bytes --]
>From 9d1837f2118efa614d1acddd09ea7f53aba15ba4 Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Mon, 17 Aug 2015 21:16:25 +0000
Subject: [PATCH] avoid failing grouping by subject with missing references
It is possible to for the topmost subroutine to return
undef, so do not blindy assume the simple_subject call
will be made on a Mail::Thread::Container object.
---
Thread.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Thread.pm b/Thread.pm
index c6f3230..941ae31 100644
--- a/Thread.pm
+++ b/Thread.pm
@@ -70,7 +70,8 @@ sub _group_set_bysubject {
my %subject;
for (my $walk = $root->child; $walk; $walk = $walk->next) {
- my $sub = $walk->topmost->simple_subject or next;
+ my $topmost = $walk->topmost or next;
+ my $sub = $topmost->simple_subject or next;
# Add this container to the hash if:
# - There is no container in the hash with this subject, or
# - This one is a dummy container and the old one is not: the dummy
@@ -97,7 +98,8 @@ sub _group_set_bysubject {
for ($walk = $root->child, $rest = eval{ $walk->next };
$walk;
$prev = $walk, $walk = $rest, $rest = eval { $rest->next }) {
- my $subj = $walk->topmost->simple_subject or next;
+ my $topmost = $walk->topmost or next;
+ my $subj = $topmost->simple_subject or next;
my $old = $subject{$subj};
next if $old == $walk;
--
EW
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [rt.cpan.org #106498] AutoReply: libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references
[not found] ` <rt-4.0.18-6738-1439849660-1489.106498-3-0@rt.cpan.org>
@ 2015-08-18 1:27 ` Eric Wong
0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2015-08-18 1:27 UTC (permalink / raw)
To: Bugs in Mail-Thread via RT; +Cc: meta
Linking to Debian bug #795913:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795913
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#795913: Acknowledgement (libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references)
[not found] ` <handler.795913.B.143984774816522.ack@bugs.debian.org>
@ 2015-08-18 1:29 ` Eric Wong
2016-04-23 20:23 ` libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references Eric Wong
0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2015-08-18 1:29 UTC (permalink / raw)
To: 795913; +Cc: meta
Upstream bug link: https://rt.cpan.org/Ticket/Display.html?id=106498
^ permalink raw reply [flat|nested] 4+ messages in thread
* libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references
2015-08-18 1:29 ` Bug#795913: Acknowledgement (libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references) Eric Wong
@ 2016-04-23 20:23 ` Eric Wong
0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2016-04-23 20:23 UTC (permalink / raw)
To: 795913; +Cc: meta
Fwiw, I suggest fixing this bug in Debian since upstream has
been nonresponsive for years. This route was taken for
https://bugs.debian.org/763403 , too.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-23 20:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <RT-Ticket-106498@rt.cpan.org>
2015-08-17 21:35 ` libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references Eric Wong
[not found] ` <rt-4.0.18-6738-1439849660-1489.106498-3-0@rt.cpan.org>
2015-08-18 1:27 ` [rt.cpan.org #106498] AutoReply: " Eric Wong
[not found] ` <handler.795913.B.143984774816522.ack@bugs.debian.org>
2015-08-18 1:29 ` Bug#795913: Acknowledgement (libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references) Eric Wong
2016-04-23 20:23 ` libmail-thread-perl: [PATCH] avoid failing grouping by subject with missing references Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).