Skip to content

Commit 2b10c9a

Browse files
committed
Hypermail could crash or created an incorrect mail thread if a message and its reply were archived in wrong order.
1 parent cb86ca7 commit 2b10c9a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Version Changes for Hypermail
44
HYPERMAIL VERSION 2.3.1:
55
============================
66

7+
Jose Kahan (June 14, 2018)
8+
- Hypermail would segfault or have an incorrect thread view if it was
9+
handling an archive with a message (msg1) that was a reply to a message not
10+
in the archive, if msg1 had a reply to it in the archive (msg2), msg2 was
11+
archived before msg1 and both msg1 and msg2 shared the same subject
12+
(regardless of Re: prefixes).
13+
714
Bill Shannon (June 7, 2018)
815
- Add charset alias for Thai and Chinese
916
- The markup for access key "j" to jump to the start of a message

src/parse.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,21 @@ void crossindex(void)
354354
&maybereply);
355355
if (status != -1) {
356356
struct emailinfo *email2;
357+
357358
if (!hashnumlookup(status, &email2)) {
358359
++num;
359360
continue;
360361
}
362+
/* make sure there is no recursion between the message
363+
and reply lookup if a message and its reply-to were
364+
archived in reverse, both messages share the same
365+
subject (regardless of Re), and the message itself was
366+
a reply to a non-archived message. */
367+
if (maybereply && !strcmp (email2->inreplyto, email->msgid)) {
368+
++num;
369+
continue;
370+
}
371+
361372
if (set_linkquotes) {
362373
struct reply *rp;
363374
int found_num = 0;

0 commit comments

Comments
 (0)