From a51f45e3a51c3ce8aab46b1294b2980287a7a224 Mon Sep 17 00:00:00 2001 From: gilles Date: Wed, 25 Jul 2018 15:24:26 +0000 Subject: [PATCH] qmail advertizes a size of 0 as "no limit on data", fix SIZE handling in mta_session.c spotted by deraadt@ and benno@ --- usr.sbin/smtpd/mta_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index 10c41f397bf..e1def0b54c2 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.103 2018/07/08 13:06:37 gilles Exp $ */ +/* $OpenBSD: mta_session.c,v 1.104 2018/07/25 15:24:26 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -287,7 +287,7 @@ mta_session_imsg(struct mproc *p, struct imsg *imsg) return; } - if (s->ext & MTA_EXT_SIZE) { + if ((s->ext & MTA_EXT_SIZE) && s->ext_size != 0) { if (fstat(imsg->fd, &sb) == -1) { log_debug("debug: mta: failed to stat msg fd"); mta_flush_task(s, IMSG_MTA_DELIVERY_TEMPFAIL, -- 2.20.1