summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta_session.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-20 17:37:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-20 17:37:55 +0000
commitee84f1cbaf28a0c8511dd2de2685028d389414b2 (patch)
tree0f2893c7931f5e91baa8636ffb931a4c90730812 /usr.sbin/smtpd/mta_session.c
parent52ef1f80c283aa859feb09537098b134f58707fc (diff)
use <limits.h> comprehensively. For now try to push <> includes to
each .c file, and out of the .h files. To avoid overinclude. ok gilles, in principle. If this has been done right, -portable should become easier to maintain.
Diffstat (limited to 'usr.sbin/smtpd/mta_session.c')
-rw-r--r--usr.sbin/smtpd/mta_session.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index 507aab18003..f45a141e972 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.70 2015/01/16 06:40:20 deraadt Exp $ */
+/* $OpenBSD: mta_session.c,v 1.71 2015/01/20 17:37:54 deraadt Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -584,8 +584,8 @@ mta_enter_state(struct mta_session *s, int newstate)
size_t envid_sz;
int oldstate;
ssize_t q;
- char ibuf[SMTPD_MAXLINESIZE];
- char obuf[SMTPD_MAXLINESIZE];
+ char ibuf[LINE_MAX];
+ char obuf[LINE_MAX];
int offset;
again:
@@ -875,7 +875,7 @@ mta_response(struct mta_session *s, char *line)
struct sockaddr *sa;
const char *domain;
socklen_t sa_len;
- char buf[SMTPD_MAXLINESIZE];
+ char buf[LINE_MAX];
int delivery;
switch (s->state) {
@@ -1193,7 +1193,7 @@ mta_io(struct io *io, int evt)
nextline:
line = iobuf_getline(&s->iobuf, &len);
if (line == NULL) {
- if (iobuf_len(&s->iobuf) >= SMTPD_MAXLINESIZE) {
+ if (iobuf_len(&s->iobuf) >= LINE_MAX) {
mta_error(s, "Input too long");
mta_free(s);
return;
@@ -1397,7 +1397,7 @@ mta_flush_task(struct mta_session *s, int delivery, const char *error, size_t co
int cache)
{
struct mta_envelope *e;
- char relay[SMTPD_MAXLINESIZE];
+ char relay[LINE_MAX];
size_t n;
struct sockaddr_storage ss;
struct sockaddr *sa;