From nobody Sat Feb 05 16:27:17 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 20A35198CBED; Sat, 5 Feb 2022 16:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jrd9150CBz3P2V; Sat, 5 Feb 2022 16:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644078437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pd29wCNbhXteQ6DtHJspOfpPkznsCAMT3ifMZCbd0jg=; b=C4cHWyBPdiXWy6rytrLYo4e4PEOiiHxe8Lvl6ttjcu7Ybj25YemMaNRiBwgIcKeSwViIfC vqUkWWk3nZ71gqF5EubFcsV4JQT85sqg0oi4NgWZ1creRAZE8ybSRGCWksftjyyueEVaoA IaraA7Byisn0wMkHwJ36HnaVXyIwnwlUsMjDfmahi/eTgYN0TWTvHQ8yzBRvHDcKCHY93g m/lod4YhTskKCaSK39cfvvXAfwiU7UICJnmm47hBqtzDxmxMDkCFJbXtQCO1tkSlljsXIL iFE+FkDN0+gawV4vGd7Mc1tbRxk9f/1PHZmz9Mc07caIGQweNu1jIoUOGJkxeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BAD622715; Sat, 5 Feb 2022 16:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 215GRHi5038647; Sat, 5 Feb 2022 16:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 215GRHRN038646; Sat, 5 Feb 2022 16:27:17 GMT (envelope-from git) Date: Sat, 5 Feb 2022 16:27:17 GMT Message-Id: <202202051627.215GRHRN038646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 62a323ecbcdc - stable/13 - dma: limit lines to 998 characters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 62a323ecbcdc14e12d9403ee1dac5ddd9ad857af Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644078437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pd29wCNbhXteQ6DtHJspOfpPkznsCAMT3ifMZCbd0jg=; b=nXR3Xdk0pZPX8dIlCor93C7beezf6o3OuG9dbxdgOEAWqhVwjdsc5xmYmxb4T/ytqHCVK/ ycFOlut+KNyN21VuLsT7Q9WaAFPrJdd4AdGmvdMHekIHfzQ6fq8+G3COSJieIlxqD+320e 3u37DYToW+qkFe2sje+lixSP0AH6D2qLq2IJPPnz9h5AepwlU1kGv6iTBShre2YiySTQ8Y 27Y0gopaZrmQBIWra8hcNbzJErLzbBeQTWXXRNpwgKKRGf4swkGO2ueSkpz4DIl/c5+Gcq OqnCUW4rJpsHZuOE6zwB4+MJRLVQi4q2XAFjXq+txPEKEroJBsAyhTCo8MshEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644078437; a=rsa-sha256; cv=none; b=J45/rpjHRXHCe+yx2xLv+WW+ZEpQNhe20S+OxpoCo+lnd97i4dfvH7JolGEEraaegmkDMh ePo056wb/8p2LR553Msn4Ki5xPQr5RmT0SncvBfKjuehx4DrMGhd/xaxWDQz3wcjOIo5w0 uBtLNZSEHjtqz0WCJbzFmlnbwt/yUV0U+g4y3a70JdYTP4qiC+B/cJeiotU4RkhucCjeNG eGGMrVSitqYRGVKpnC7iBCfYLjcjnP1rJZD+EDpYieZ2HIoGLRCypWH5UaM6ST6RccWKxl 1wZGLQbZt26+i1HlCWCZNtuvvAN2iPrzQojUTD/0h/jxdlu4yxoCmaBb3aF0YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=62a323ecbcdc14e12d9403ee1dac5ddd9ad857af commit 62a323ecbcdc14e12d9403ee1dac5ddd9ad857af Author: Ed Maste AuthorDate: 2022-01-28 14:57:44 +0000 Commit: Ed Maste CommitDate: 2022-02-05 16:26:39 +0000 dma: limit lines to 998 characters Per RFC2822 the maximum transmitted line length is "998 characters... excluding the CRLF." In a file the maximum is 999 with the \n included. Previously mail containing a line with exactly 999 characters would bounce. PR: 208261 Reported by: Helge Oldach MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 1a0dde338df8b493d74dcb2f7bbaaa6c02cab371) --- contrib/dma/mail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/dma/mail.c b/contrib/dma/mail.c index 48c8ee6d4dd2..9e00c22d71db 100644 --- a/contrib/dma/mail.c +++ b/contrib/dma/mail.c @@ -43,7 +43,7 @@ #include "dma.h" -#define MAX_LINE_RFC822 1000 +#define MAX_LINE_RFC822 999 /* 998 characters plus \n */ void bounce(struct qitem *it, const char *reason) @@ -378,7 +378,7 @@ readmail(struct queue *queue, int nodot, int recp_from_header) char *line = NULL; ssize_t linelen; size_t linecap = 0; - char newline[MAX_LINE_RFC822]; + char newline[MAX_LINE_RFC822 + 1]; size_t error; int had_headers = 0; int had_from = 0;