SHA256
1
0
forked from pool/dovecot23
dovecot23/847790d5aab84df38256a6f9b4849af0eb408419.patch

26 lines
886 B
Diff

From 847790d5aab84df38256a6f9b4849af0eb408419 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@dovecot.fi>
Date: Mon, 14 May 2018 23:56:21 +0200
Subject: [PATCH] lmtp: Fix segfault occurring when a user turns out to be over
quota at DATA transfer.
The LMTP recipient context was not updated with the final recipient address when
the RCPT command was accepted. This left a dangling struct smtp_address pointer
which triggered the segfault when used.
---
src/lmtp/lmtp-common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lmtp/lmtp-common.c b/src/lmtp/lmtp-common.c
index b3f13dec41..39ed6c1b4f 100644
--- a/src/lmtp/lmtp-common.c
+++ b/src/lmtp/lmtp-common.c
@@ -22,6 +22,7 @@ void lmtp_recipient_finish(struct lmtp_recipient *rcpt,
{
trcpt->context = rcpt;
+ rcpt->path = trcpt->path;
rcpt->rcpt = trcpt;
rcpt->index = index;
rcpt->rcpt_cmd = NULL;