summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/smtpd/aliases.c6
-rw-r--r--usr.sbin/smtpd/bounce.c8
-rw-r--r--usr.sbin/smtpd/control.c4
-rw-r--r--usr.sbin/smtpd/expand.c6
-rw-r--r--usr.sbin/smtpd/lka.c4
-rw-r--r--usr.sbin/smtpd/mda.c8
-rw-r--r--usr.sbin/smtpd/mfa_session.c4
-rw-r--r--usr.sbin/smtpd/mta.c6
-rw-r--r--usr.sbin/smtpd/mta_session.c8
-rw-r--r--usr.sbin/smtpd/queue.c4
-rw-r--r--usr.sbin/smtpd/smtp_session.c18
-rw-r--r--usr.sbin/smtpd/smtpctl.c4
-rw-r--r--usr.sbin/smtpd/smtpd-api.h4
-rw-r--r--usr.sbin/smtpd/smtpd.c4
-rw-r--r--usr.sbin/smtpd/smtpd.h15
-rw-r--r--usr.sbin/smtpd/table_db.c6
-rw-r--r--usr.sbin/smtpd/table_static.c4
-rw-r--r--usr.sbin/smtpd/to.c8
-rw-r--r--usr.sbin/smtpd/util.c4
19 files changed, 61 insertions, 64 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c
index 51e94a36773..8056487ed45 100644
--- a/usr.sbin/smtpd/aliases.c
+++ b/usr.sbin/smtpd/aliases.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aliases.c,v 1.62 2013/04/01 16:11:32 tobias Exp $ */
+/* $OpenBSD: aliases.c,v 1.63 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -78,7 +78,7 @@ aliases_get(struct expand *expand, const char *username)
int
aliases_virtual_check(struct table *table, const struct mailaddr *maddr)
{
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
char *pbuf;
int ret;
@@ -124,7 +124,7 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
{
struct expandnode *xn;
struct expand *xp;
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
char *pbuf;
int nbaliases;
int ret;
diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c
index 4700ef1e590..d09cd7604fd 100644
--- a/usr.sbin/smtpd/bounce.c
+++ b/usr.sbin/smtpd/bounce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bounce.c,v 1.54 2013/01/26 09:37:23 gilles Exp $ */
+/* $OpenBSD: bounce.c,v 1.55 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
@@ -120,7 +120,7 @@ bounce_init(void)
void
bounce_add(uint64_t evpid)
{
- char buf[MAX_LINE_SIZE], *line;
+ char buf[SMTPD_MAXLINESIZE], *line;
struct envelope evp;
struct bounce_message key, *msg;
struct bounce_envelope *be;
@@ -322,7 +322,7 @@ static int
bounce_next_message(struct bounce_session *s)
{
struct bounce_message *msg;
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
int fd;
again:
@@ -587,7 +587,7 @@ bounce_io(struct io *io, int evt)
case IO_DATAIN:
nextline:
line = iobuf_getline(&s->iobuf, &len);
- if (line == NULL && iobuf_len(&s->iobuf) >= SMTP_LINE_MAX) {
+ if (line == NULL && iobuf_len(&s->iobuf) >= SMTPD_MAXLINESIZE) {
bounce_status(s, "Input too long");
bounce_free(s);
return;
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index b28bba91325..e3267d6d6fd 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.83 2013/03/11 17:40:11 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.84 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -674,7 +674,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg)
/* table name too long */
len = strlen(imsg->data);
- if (len >= MAX_LINE_SIZE)
+ if (len >= SMTPD_MAXLINESIZE)
goto invalid;
m_forward(p_lka, imsg);
diff --git a/usr.sbin/smtpd/expand.c b/usr.sbin/smtpd/expand.c
index 7c37c04c4bc..4e96cdf08fe 100644
--- a/usr.sbin/smtpd/expand.c
+++ b/usr.sbin/smtpd/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.21 2013/02/14 12:30:49 gilles Exp $ */
+/* $OpenBSD: expand.c,v 1.22 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
@@ -129,7 +129,7 @@ expand_cmp(struct expandnode *e1, struct expandnode *e2)
static int
expand_line_split(char **line, char **ret)
{
- static char buffer[MAX_LINE_SIZE];
+ static char buffer[SMTPD_MAXLINESIZE];
int esc, i, dq, sq;
char *s;
@@ -172,7 +172,7 @@ int
expand_line(struct expand *expand, const char *s, int do_includes)
{
struct expandnode xn;
- char buffer[MAX_LINE_SIZE];
+ char buffer[SMTPD_MAXLINESIZE];
char *p, *subrcpt;
int ret;
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index de6e8deadf9..eea6d30edd9 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.150 2013/02/14 12:30:49 gilles Exp $ */
+/* $OpenBSD: lka.c,v 1.151 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -84,7 +84,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
struct addrname addrname;
struct envelope evp;
struct msg m;
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
const char *tablename, *username, *password, *label;
uint64_t reqid;
size_t i, len;
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c
index c54c256ad8b..4b98b3937a4 100644
--- a/usr.sbin/smtpd/mda.c
+++ b/usr.sbin/smtpd/mda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mda.c,v 1.89 2013/02/05 11:45:18 gilles Exp $ */
+/* $OpenBSD: mda.c,v 1.90 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -119,7 +119,7 @@ mda_imsg(struct mproc *p, struct imsg *imsg)
const char *username, *usertable;
uint64_t reqid;
size_t sz;
- char out[256], buf[MAX_LINE_SIZE];
+ char out[256], buf[SMTPD_MAXLINESIZE];
int n, v;
enum lka_resp_status status;
@@ -674,7 +674,7 @@ static int
mda_getlastline(int fd, char *dst, size_t dstsz)
{
FILE *fp;
- char *ln, buf[MAX_LINE_SIZE];
+ char *ln, buf[SMTPD_MAXLINESIZE];
size_t len;
bzero(buf, sizeof buf);
@@ -852,7 +852,7 @@ mda_done(struct mda_session *s)
static void
mda_log(const struct mda_envelope *evp, const char *prefix, const char *status)
{
- char rcpt[MAX_LINE_SIZE];
+ char rcpt[SMTPD_MAXLINESIZE];
const char *method;
rcpt[0] = '\0';
diff --git a/usr.sbin/smtpd/mfa_session.c b/usr.sbin/smtpd/mfa_session.c
index c6d23e55697..ba14eb7e94a 100644
--- a/usr.sbin/smtpd/mfa_session.c
+++ b/usr.sbin/smtpd/mfa_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfa_session.c,v 1.15 2013/03/26 13:30:29 millert Exp $ */
+/* $OpenBSD: mfa_session.c,v 1.16 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -90,7 +90,7 @@ struct mfa_query {
struct sockaddr_storage remote;
char hostname[MAXHOSTNAMELEN];
} connect;
- char line[MAX_LINE_SIZE];
+ char line[SMTPD_MAXLINESIZE];
struct mailaddr maddr;
} u;
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index ac91fff2a34..89e54d40efb 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.155 2013/02/18 13:37:14 eric Exp $ */
+/* $OpenBSD: mta.c,v 1.156 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -148,7 +148,7 @@ mta_imsg(struct mproc *p, struct imsg *imsg)
struct msg m;
const char *secret;
uint64_t reqid;
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
int dnserror, preference, v, status;
if (p->proc == PROC_QUEUE) {
@@ -1139,7 +1139,7 @@ static void
mta_log(const struct mta_envelope *evp, const char *prefix, const char *relay,
const char *status)
{
- char rcpt[MAX_LINE_SIZE];
+ char rcpt[SMTPD_MAXLINESIZE];
rcpt[0] = '\0';
if (evp->rcpt)
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index 49abb2c62e7..a0e9d5061c2 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.34 2013/02/21 16:25:21 eric Exp $ */
+/* $OpenBSD: mta_session.c,v 1.35 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -682,7 +682,7 @@ static void
mta_response(struct mta_session *s, char *line)
{
struct mta_envelope *e;
- char buf[MAX_LINE_SIZE];
+ char buf[SMTPD_MAXLINESIZE];
int delivery;
switch (s->state) {
@@ -906,7 +906,7 @@ mta_io(struct io *io, int evt)
nextline:
line = iobuf_getline(&s->iobuf, &len);
if (line == NULL) {
- if (iobuf_len(&s->iobuf) >= SMTP_LINE_MAX) {
+ if (iobuf_len(&s->iobuf) >= SMTPD_MAXLINESIZE) {
mta_error(s, "Input too long");
mta_free(s);
return;
@@ -1065,7 +1065,7 @@ static void
mta_flush_task(struct mta_session *s, int delivery, const char *error, size_t count)
{
struct mta_envelope *e;
- char relay[MAX_LINE_SIZE];
+ char relay[SMTPD_MAXLINESIZE];
size_t n;
snprintf(relay, sizeof relay, "%s", mta_host_to_text(s->route->dst));
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index 33ef9cf6d43..ffb956e1766 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.146 2013/01/31 18:24:47 eric Exp $ */
+/* $OpenBSD: queue.c,v 1.147 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -637,7 +637,7 @@ queue_loop(uint64_t evpid)
static void
queue_log(const struct envelope *e, const char *prefix, const char *status)
{
- char rcpt[MAX_LINE_SIZE];
+ char rcpt[SMTPD_MAXLINESIZE];
rcpt[0] = '\0';
if (strcmp(e->rcpt.user, e->dest.user) ||
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index dcd4b459763..4f008eaecd8 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.181 2013/02/21 14:22:52 eric Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.182 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -115,8 +115,8 @@ struct smtp_session {
enum imsg_type mfa_imsg; /* last send */
- char helo[SMTP_LINE_MAX];
- char cmd[SMTP_LINE_MAX];
+ char helo[SMTPD_MAXLINESIZE];
+ char cmd[SMTPD_MAXLINESIZE];
char username[MAXLOGNAME];
struct envelope evp;
@@ -219,7 +219,7 @@ smtp_session(struct listener *listener, int sock,
if ((s = calloc(1, sizeof(*s))) == NULL)
return (-1);
- if (iobuf_init(&s->iobuf, MAX_LINE_SIZE, MAX_LINE_SIZE) == -1) {
+ if (iobuf_init(&s->iobuf, SMTPD_MAXLINESIZE, SMTPD_MAXLINESIZE) == -1) {
free(s);
return (-1);
}
@@ -754,8 +754,8 @@ smtp_io(struct io *io, int evt)
case IO_DATAIN:
nextline:
line = iobuf_getline(&s->iobuf, &len);
- if ((line == NULL && iobuf_len(&s->iobuf) >= SMTP_LINE_MAX) ||
- (line && len >= SMTP_LINE_MAX)) {
+ if ((line == NULL && iobuf_len(&s->iobuf) >= SMTPD_MAXLINESIZE) ||
+ (line && len >= SMTPD_MAXLINESIZE)) {
smtp_reply(s, "500 Line too long");
smtp_enter_state(s, STATE_QUIT);
io_set_write(io);
@@ -1208,7 +1208,7 @@ abort:
static void
smtp_rfc4954_auth_login(struct smtp_session *s, char *arg)
{
- char buf[MAX_LINE_SIZE + 1];
+ char buf[SMTPD_MAXLINESIZE];
switch (s->state) {
case STATE_HELO:
@@ -1398,12 +1398,12 @@ smtp_reply(struct smtp_session *s, char *fmt, ...)
{
va_list ap;
int n;
- char buf[SMTP_LINE_MAX], tmp[SMTP_LINE_MAX];
+ char buf[SMTPD_MAXLINESIZE], tmp[SMTPD_MAXLINESIZE];
va_start(ap, fmt);
n = vsnprintf(buf, sizeof buf, fmt, ap);
va_end(ap);
- if (n == -1 || n >= SMTP_LINE_MAX)
+ if (n == -1 || n >= SMTPD_MAXLINESIZE)
fatalx("smtp_reply: line too long");
if (n < 4)
fatalx("smtp_reply: response too short");
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 43c82372509..fabb423d00e 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.101 2013/02/14 12:30:49 gilles Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.102 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2006 Gilles Chehade <gilles@poolp.org>
@@ -178,7 +178,7 @@ main(int argc, char *argv[])
struct imsg imsg;
struct smtpd smtpd;
uint64_t ulval;
- char name[MAX_LINE_SIZE];
+ char name[SMTPD_MAXLINESIZE];
int done = 0;
int verb = 0;
int profile = 0;
diff --git a/usr.sbin/smtpd/smtpd-api.h b/usr.sbin/smtpd/smtpd-api.h
index ffd626c660a..ac43bc095d8 100644
--- a/usr.sbin/smtpd/smtpd-api.h
+++ b/usr.sbin/smtpd/smtpd-api.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd-api.h,v 1.2 2013/02/14 14:34:07 eric Exp $ */
+/* $OpenBSD: smtpd-api.h,v 1.3 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -28,7 +28,7 @@
#define FILTER_API_VERSION 50
-#define MAX_LINE_SIZE 2048
+#define SMTPD_MAXLINESIZE 2048
#define MAX_LOCALPART_SIZE (64 + 1)
#define MAX_DOMAINPART_SIZE (255 + 1)
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 8bdc6cee6ec..f2e21b3adcb 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.188 2013/02/14 13:11:40 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.189 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1527,7 +1527,7 @@ int
parent_auth_user(const char *username, const char *password)
{
char user[MAXLOGNAME];
- char pass[MAX_LINE_SIZE + 1];
+ char pass[SMTPD_MAXLINESIZE];
int ret;
strlcpy(user, username, sizeof(user));
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 154ee42ee4d..dd013c10ea0 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.408 2013/03/06 21:42:40 sthen Exp $ */
+/* $OpenBSD: smtpd.h,v 1.409 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -80,9 +80,6 @@
/* how many responses per state are undelayed */
#define FAST_RESPONSES 2
-/* max len of any smtp line */
-#define SMTP_LINE_MAX MAX_LINE_SIZE
-
#define F_STARTTLS 0x01
#define F_SMTPS 0x02
#define F_TLS_OPTIONAL 0x04
@@ -137,8 +134,8 @@ struct relayhost {
};
struct credentials {
- char username[MAX_LINE_SIZE];
- char password[MAX_LINE_SIZE];
+ char username[SMTPD_MAXLINESIZE];
+ char password[SMTPD_MAXLINESIZE];
};
struct destination {
@@ -299,7 +296,7 @@ enum table_service {
};
struct table {
- char t_name[MAX_LINE_SIZE];
+ char t_name[SMTPD_MAXLINESIZE];
objid_t t_id;
enum table_type t_type;
char t_src[MAX_TABLE_BACKEND_SIZE];
@@ -457,7 +454,7 @@ struct envelope {
char helo[MAXHOSTNAMELEN];
char hostname[MAXHOSTNAMELEN];
- char errorline[MAX_LINE_SIZE + 1];
+ char errorline[SMTPD_MAXLINESIZE];
struct sockaddr_storage ss;
struct mailaddr sender;
@@ -522,7 +519,7 @@ struct listener {
struct ssl *ssl;
void *ssl_ctx;
char tag[MAX_TAG_SIZE];
- char authtable[MAX_LINE_SIZE];
+ char authtable[SMTPD_MAXLINESIZE];
char helo[MAXHOSTNAMELEN];
TAILQ_ENTRY(listener) entry;
};
diff --git a/usr.sbin/smtpd/table_db.c b/usr.sbin/smtpd/table_db.c
index fe8647916ee..23030422817 100644
--- a/usr.sbin/smtpd/table_db.c
+++ b/usr.sbin/smtpd/table_db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_db.c,v 1.3 2013/02/13 14:34:43 gilles Exp $ */
+/* $OpenBSD: table_db.c,v 1.4 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -263,7 +263,7 @@ table_db_get_entry(void *hdl, const char *key, size_t *len)
int ret;
DBT dbk;
DBT dbv;
- char pkey[MAX_LINE_SIZE];
+ char pkey[SMTPD_MAXLINESIZE];
/* workaround the stupidity of the DB interface */
if (strlcpy(pkey, key, sizeof pkey) >= sizeof pkey)
@@ -290,7 +290,7 @@ table_db_credentials(const char *key, char *line, size_t len, void **retp)
return -1;
/* too big to fit in a smtp session line */
- if (len >= MAX_LINE_SIZE)
+ if (len >= SMTPD_MAXLINESIZE)
return -1;
p = strchr(line, ':');
diff --git a/usr.sbin/smtpd/table_static.c b/usr.sbin/smtpd/table_static.c
index b4e9767d1b3..cd77677ab02 100644
--- a/usr.sbin/smtpd/table_static.c
+++ b/usr.sbin/smtpd/table_static.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_static.c,v 1.3 2013/02/13 14:34:43 gilles Exp $ */
+/* $OpenBSD: table_static.c,v 1.4 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -249,7 +249,7 @@ table_static_credentials(const char *key, char *line, size_t len, void **retp)
return -1;
/* too big to fit in a smtp session line */
- if (len >= MAX_LINE_SIZE)
+ if (len >= SMTPD_MAXLINESIZE)
return -1;
p = strchr(line, ':');
diff --git a/usr.sbin/smtpd/to.c b/usr.sbin/smtpd/to.c
index 49c52477ed5..0d23103c395 100644
--- a/usr.sbin/smtpd/to.c
+++ b/usr.sbin/smtpd/to.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: to.c,v 1.5 2013/04/08 06:50:07 gilles Exp $ */
+/* $OpenBSD: to.c,v 1.6 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -97,7 +97,7 @@ text_to_mailaddr(struct mailaddr *maddr, const char *email)
{
char *username;
char *hostname;
- char buffer[MAX_LINE_SIZE];
+ char buffer[SMTPD_MAXLINESIZE];
if (strlcpy(buffer, email, sizeof buffer) >= sizeof buffer)
return 0;
@@ -134,7 +134,7 @@ text_to_mailaddr(struct mailaddr *maddr, const char *email)
const char *
mailaddr_to_text(const struct mailaddr *maddr)
{
- static char buffer[MAX_LINE_SIZE];
+ static char buffer[SMTPD_MAXLINESIZE];
strlcpy(buffer, maddr->user, sizeof buffer);
strlcat(buffer, "@", sizeof buffer);
@@ -628,7 +628,7 @@ int
text_to_credentials(struct credentials *creds, const char *s)
{
char *p;
- char buffer[MAX_LINE_SIZE];
+ char buffer[SMTPD_MAXLINESIZE];
size_t offset;
p = strchr(s, ':');
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c
index 07a4d412639..93c7aff31b0 100644
--- a/usr.sbin/smtpd/util.c
+++ b/usr.sbin/smtpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.92 2013/02/05 11:45:18 gilles Exp $ */
+/* $OpenBSD: util.c,v 1.93 2013/04/12 18:22:49 eric Exp $ */
/*
* Copyright (c) 2000,2001 Markus Friedl. All rights reserved.
@@ -699,7 +699,7 @@ parse_smtp_response(char *line, size_t len, char **msg, int *cont)
{
size_t i;
- if (len >= SMTP_LINE_MAX)
+ if (len >= SMTPD_MAXLINESIZE)
return "line too long";
if (len > 3) {