From 0f1ffe142cf29aaa1a8fae056d298a342a1e3086 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 31 Aug 2016 16:20:36 +1000 Subject: [PATCH] Fix for null subjects --- mail_menu.c | 4 ++++ www_msgs.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mail_menu.c b/mail_menu.c index 8262995..72c32ba 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -260,6 +260,10 @@ struct msg_headers *read_message_headers(int msgconf, int msgarea, struct user_r } JAM_DelSubPacket(jsp); + if (jamm->subject == NULL) { + jamm->subject = strdup("(No Subject)"); + } + if (jmh.Attribute & MSG_PRIVATE) { if (!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) && !msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf)) { diff --git a/www_msgs.c b/www_msgs.c index 4f1611a..c737d25 100644 --- a/www_msgs.c +++ b/www_msgs.c @@ -329,6 +329,10 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i } JAM_DelSubPacket(jsp); + if (subject == NULL) { + subject = strdup("(No Subject)"); + } + if (jmh.Attribute & MSG_PRIVATE) { if (!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) && !msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference)) {