From c9f7f07a77a55941e6f3158024a31d6e55bdea8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 27 Jan 2007 07:47:33 +0000 Subject: Prevent segfault expanding %F in the MDA string when the reverse path is not specified. --- NEWS | 3 +++ local.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 146ace0..b87e194 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,9 @@ News * Use a reasonable default for the reverse path when one is not specified, instead of an empty one. + * Prevent segfault expanding %F in the MDA string when the reverse + path is not specified. + * Version 0.5.1 (2005-03-10): diff --git a/local.c b/local.c index 0937178..494d163 100644 --- a/local.c +++ b/local.c @@ -97,7 +97,7 @@ void local_init(message_t *message) /* get From address for %F */ if (strstr(before, "%F")) { - from = xstrdup(message->reverse_path); + from = xstrdup(message->reverse_path ? message->reverse_path : ""); sanitize(from); -- cgit v1.2.3