diff options
author | 2012-08-20 21:14:17 +0000 | |
---|---|---|
committer | 2012-08-20 21:14:17 +0000 | |
commit | cdc24df04bc8c496e1d8b9af2a44702436cba134 (patch) | |
tree | 6f8b7fcdd7d9b2e155ce7be1e91b05d588bd264d | |
parent | add -Wdeclaration-after-statement to the default CDIAGFLAGS (used when (diff) | |
download | wireguard-openbsd-cdc24df04bc8c496e1d8b9af2a44702436cba134.tar.xz wireguard-openbsd-cdc24df04bc8c496e1d8b9af2a44702436cba134.zip |
MAX_LINE_SIZE is supposed to define the max length of a SMTP line ...
... but SMTP_LINE_MAX *also* defines it ... with a different value ...
and did I mention both were too small anyway ?
quick fix until we kill one or the other: bump MAX_LINE_SIZE and define
SMTP_LINE_MAX to be MAX_LINE_SIZE. this fixes the immediate issue while
we decide which one bites the dust.
fixes the crashes and "line too long" errors spotted by todd@
ok todd@, ok chl@
-rw-r--r-- | usr.sbin/smtpd/filter_api.h | 14 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 9 |
2 files changed, 6 insertions, 17 deletions
diff --git a/usr.sbin/smtpd/filter_api.h b/usr.sbin/smtpd/filter_api.h index 77b08d16b76..6740db2c309 100644 --- a/usr.sbin/smtpd/filter_api.h +++ b/usr.sbin/smtpd/filter_api.h @@ -1,4 +1,4 @@ -/* $OpenBSD: filter_api.h,v 1.3 2012/08/19 14:16:58 chl Exp $ */ +/* $OpenBSD: filter_api.h,v 1.4 2012/08/20 21:14:17 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -20,19 +20,11 @@ #include <netdb.h> -#define FILTER_API_VERSION 50 +#define FILTER_API_VERSION 50 -#if !defined(MAX_LINE_SIZE) -#define MAX_LINE_SIZE 1000 -#endif - -#if !defined(MAX_LOCALPART_SIZE) +#define MAX_LINE_SIZE 2048 #define MAX_LOCALPART_SIZE 64 -#endif - -#if !defined(MAX_DOMAINPART_SIZE) #define MAX_DOMAINPART_SIZE 255 -#endif enum filter_status { STATUS_IGNORE, diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 76b22373676..9232322ed1b 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.326 2012/08/19 14:16:58 chl Exp $ */ +/* $OpenBSD: smtpd.h,v 1.327 2012/08/20 21:14:17 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -34,10 +34,7 @@ #define MAX_HOPS_COUNT 100 #define MAX_TAG_SIZE 32 -/* SYNC WITH filter.h */ -//#define MAX_LINE_SIZE 1000 -//#define MAX_LOCALPART_SIZE 128 -//#define MAX_DOMAINPART_SIZE MAXHOSTNAMELEN + /* return and forward path size */ #define MAX_FILTER_NAME 32 @@ -75,7 +72,7 @@ #define FAST_RESPONSES 2 /* max len of any smtp line */ -#define SMTP_LINE_MAX 1000 +#define SMTP_LINE_MAX MAX_LINE_SIZE #define F_STARTTLS 0x01 #define F_SMTPS 0x02 |