From nobody Fri Jan 28 15:06:27 2022 X-Original-To: dev-commits-src-main@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 ECAE61997AF4; Fri, 28 Jan 2022 15:06:27 +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 4JlglR6MTsz3vjF; Fri, 28 Jan 2022 15:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643382387; 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=GbPu33ibc90+iIONWl2ZSwv8/PLz+xB8xS3pqgjKw3M=; b=JOmKbXt4H1z6POnuepNgfhkQfO4hR2kBZ4XFiGJZYpm704/sHiuog3jSUid9VNZVaOLz97 jGpPG3EL7nVAleZkqRcrX0x9Gr3GC4pnmSRqt/COZC54VYYJ8YCa6GYZdXcZ/sK0KgHbde KWIkELCuHe0qwUgxLHIH3JeDsDP/tYiajeqiv+viuI9mE6UMdTIwtjiYfKIo13fBB3nu3T bFvCllkWJSe9dzE+NWbFxkeOoEvqDzEUn5AKKJJQrbPEWiXktXNMyz4iDZ8+kMkPzWbCn/ yziQn8L/J1I4zxMqIzV73OsFJ00OIHzalYE19Ms16Hbsi1fdwut6iA8Vn/Kg0Q== 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 BA4F52C42C; Fri, 28 Jan 2022 15:06:27 +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 20SF6RYQ021785; Fri, 28 Jan 2022 15:06:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20SF6R11021784; Fri, 28 Jan 2022 15:06:27 GMT (envelope-from git) Date: Fri, 28 Jan 2022 15:06:27 GMT Message-Id: <202201281506.20SF6R11021784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1a0dde338df8 - main - dma: limit lines to 998 characters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1a0dde338df8b493d74dcb2f7bbaaa6c02cab371 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643382387; 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=GbPu33ibc90+iIONWl2ZSwv8/PLz+xB8xS3pqgjKw3M=; b=EC4LZz7dpDhfGHhHSbK+ydOTXnsqFMRHFpHqIezPnqi4N+pRIpTS5znJ+lqQnFWGq8Rjto mL4gXNyRFilFpH1fQhatvCTVdwapUfxkPTJSsuynucQSTWNGMY9FKI7Bs3ZEp7RiM75RPR lK/NdAbUhUXtDAXmjbrcQmIkFC1AEH8zGUClyFCiODLEqzgtBO5NKylTNzqjMR6KJUyUng p+NRnZll3ImHvS9+FMn7LsIWSVgb6TwcrkO1c4ZLaFlim8ph0JCnK/ToWjhysJxK4oJyfA dO/6xAush2cIDTX5WsbHezCSt5xAseVLDVACSk6ARfmXzl9CIOpJpz2d7mnVNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643382387; a=rsa-sha256; cv=none; b=yi2oSnwKA6StS6tUX2B1abhXG1rDPI2RPGbnHcAmSHWOZpqA3UbiEa4qSP9euPU2Fo0VL3 uFNGSx07xpi4Tiyf/KX5z0oqYVqFw7zXEPsCwQarnLRkKjVGu70dHNybgapBFdE9MSXZP5 Y/WouiQBOBnI6i3k5l4GJrWZ8jgmdBvn/I3SzFleFLnX/TBtzqnlDztSnNP8iMPyE3/p+R 3FAFY4xAWMDT4q2sonB4RHja9pV9vOC+Q8hmVBm6c/nrmQXLw5O9tELNmy/iLBG501/HUl 6WftPdL+sfNF067sdIU2M54FuxzFhMMiqV2QOuG2afcsloD1nf3/MWePzS2q3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1a0dde338df8b493d74dcb2f7bbaaa6c02cab371 commit 1a0dde338df8b493d74dcb2f7bbaaa6c02cab371 Author: Ed Maste AuthorDate: 2022-01-28 14:57:44 +0000 Commit: Ed Maste CommitDate: 2022-01-28 15:02:43 +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 --- 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;