mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-17 23:53:15 +01:00
linke_message: Avoid segfault when In-Reply-to header is empty.
This was recently introduced in commit:
64c03ae97f
which was adding extra checks to avoid adding a self-referencing
message.
How many times am I going to fix a dumb regression like this and say
"we really need a test suite" before I actually sit down and write the
test suite?
This commit is contained in:
parent
024cdf8e3c
commit
fc3a3be337
1 changed files with 2 additions and 1 deletions
|
@ -726,7 +726,8 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
|
||||||
|
|
||||||
/* Carefully avoid adding any self-referential in-reply-to term. */
|
/* Carefully avoid adding any self-referential in-reply-to term. */
|
||||||
in_reply_to_message_id = _parse_message_id (message, in_reply_to, NULL);
|
in_reply_to_message_id = _parse_message_id (message, in_reply_to, NULL);
|
||||||
if (strcmp (in_reply_to_message_id,
|
if (in_reply_to_message_id &&
|
||||||
|
strcmp (in_reply_to_message_id,
|
||||||
notmuch_message_get_message_id (message)))
|
notmuch_message_get_message_id (message)))
|
||||||
{
|
{
|
||||||
_notmuch_message_add_term (message, "replyto",
|
_notmuch_message_add_term (message, "replyto",
|
||||||
|
|
Loading…
Add table
Reference in a new issue