]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Fix segfault occurring when a user turns out to be over quota at DATA transfer.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 14 May 2018 21:56:21 +0000 (23:56 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 28 May 2018 07:12:28 +0000 (10:12 +0300)
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

index b3f13dec418b9eaec08434531f3dccb5bdc1436c..39ed6c1b4fd13b665ccbb4b36deb88bc12c3ca49 100644 (file)
@@ -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;