[balsa/wip/gmime3: 59/197] Do not crash if DSN header is absent
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3: 59/197] Do not crash if DSN header is absent
- Date: Wed, 23 May 2018 21:17:19 +0000 (UTC)
commit f83cba68899434ce052637274d257329ce23a28e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Aug 20 18:24:17 2017 -0400
Do not crash if DSN header is absent
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1483355,
reported by tonynelson georgeanelson com.
* libbalsa/send.c (lbs_process_queue_msg): check for missing
X-Balsa-DSN header, and do not pass NULL to atoi.
ChangeLog | 9 +++++++++
libbalsa/send.c | 4 +++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b41f476..254eaa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-08-20 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Do not crash if DSN header is absent
+
+ Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1483355
+
+ * libbalsa/send.c (lbs_process_queue_msg): check for missing
+ X-Balsa-DSN header, and do not pass NULL to atoi.
+
2017-08-11 Peter Bloomfield <pbloomfield bellsouth net>
* libbalsa/imap/imap-handle.c (idle_start): assert that the
diff --git a/libbalsa/send.c b/libbalsa/send.c
index a992689..7c78065 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -704,6 +704,7 @@ lbs_process_queue_msg(guint msgno,
LibBalsaMessage* msg;
const gchar* smtp_server_name;
LibBalsaMsgCreateResult created;
+ const gchar *dsn_header;
/* Skip this message if it either FLAGGED or DELETED: */
if (!libbalsa_mailbox_msgno_has_flags(send_message_info->outbox, msgno, 0,
@@ -729,7 +730,8 @@ lbs_process_queue_msg(guint msgno,
return;
}
- msg->request_dsn = (atoi(libbalsa_message_get_user_header(msg, "X-Balsa-DSN")) != 0);
+ dsn_header = libbalsa_message_get_user_header(msg, "X-Balsa-DSN");
+ msg->request_dsn = dsn_header != NULL ? atoi(dsn_header) != 0 : FALSE;
new_message = msg_queue_item_new(send_message_info);
created = libbalsa_fill_msg_queue_item_from_queu(msg, new_message);
libbalsa_message_body_unref(msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]